It's somewhat easier to use:
my $a = 'whatever'; @arr2 = sort { $::a <=> $::b } @arr1;
In reply to Re: my $a outside sort block incompatibility
by BrowserUk
in thread my $a outside sort block incompatibility
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |