diff options
| -rwxr-xr-x | challenge-245/robbie-hatley/perl/ch-1.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-245/robbie-hatley/perl/ch-1.pl b/challenge-245/robbie-hatley/perl/ch-1.pl index 900ec850f9..daccc6014f 100755 --- a/challenge-245/robbie-hatley/perl/ch-1.pl +++ b/challenge-245/robbie-hatley/perl/ch-1.pl @@ -42,7 +42,7 @@ IO NOTES: Input is via either built-in variables or via @ARGV. If using @ARGV, provide one argument which must be a double-quoted array of arrays of two arrays, with the inner array pairs consisting of an array of single-quoted strings followed by an array of small positive integers (1-9), in proper Perl syntax, like so: -./ch-1.pl "([['Go','Lisp','AutoIt3','Logo'],[2, 1, 4, 3]],[['Awk','Cobol','Perl','Sed'],[3,4,1,2]])" +./ch-1.pl "([['Go','Lisp','AutoIt3','Logo'],[2, 1, 4, 3]],[['Awk','Cobol','Perl','Sed'],['golf','quaint','broad','easy']])" Output is to STDOUT and will be each input array followed by the corresponding output. @@ -70,7 +70,7 @@ BEGIN {$t0 = time} sub is_array_of_numbers($aref) { return 0 if 'ARRAY' ne ref $aref; for (@$aref) { - return 0 if !/^0$|^-?0\.[0-9]+$|^-?[1-9]\d*(?:\.[0-9]+)$/; + return 0 if !/^0$|^-?0\.[0-9]+$|^-?[1-9]\d*(?:\.[0-9]+)*$/; } return 1; } |
