- or download this
#!/usr/local/bin/perl
use strict;
use warnings;
my $a = [1, 2, 5, 7, 4];
print sort { $a <=> $b } @$a;
- or download this
Can't use "my $a" in sort comparison at /home/code/perl/arrayprob.pl l
+ine 5.
- or download this
my $ab = [1,2,5,7,4];
print sort { $a <=> $b } @$ab;