- or download this
use List::Util qw/reduce/;
# my ($a,$b)=(0,0);
print reduce { $b+=$a } 1..10;
- or download this
use warnings;
use strict;
...
use Data::Dump;
dd \@x;
- or download this
my ($a,$b)=(0,0);
print sort { $b cmp $a } 1..10;
- or download this
Can't use "my $b" in sort comparison at ... line 2.
- or download this
use warnings;
use strict;
...
package Tst;
print sort { $b cmp $a } 1..10;
- or download this
Use of uninitialized value $b in string comparison (cmp) at /home/lanx
+/B/PL/PM/ScopeListUtils.pl line 9.
Use of uninitialized value $a in string comparison (cmp) at /home/lanx
+/B/PL/PM/ScopeListUtils.pl line 9.
Use of uninitialized value $b in string comparison (cmp) at /home/lanx
+/B/PL/PM/ScopeListUtils.pl line 9.
Use of uninitialized value $a in string comparison (cmp) at /home/lanx
+/B/PL/PM/ScopeListUtils.pl line 9.
...