in reply to my $a outside sort block incompatibility
The main reason to use the ($$) prototype in a sort routine is the case where you may be defining the sort routine in one package, and then calling sort in another.... my $a = "whatever"; my $sort_sub = sub ($$) { $_[0] <=> $_[1] }; @arr2 = sort $sort_sub @arr1; ...
|
|---|