I added this bit immediately before the ARGV[0] length checking. This makes it simpler to just call the script by itself.

Code:
# Assume 10 character length is no argument is given
 unless (defined($ARGV[0])) {
    $ARGV[0] = 10;
 }