For 5.004 you'd have to:use strict; my $foo = [ {blah=>'aaa'},{blah=>'ddd'},{blah=>'ccc'} ]; my $sortfunc = sub { $a->{blah} cmp $b->{blah} }; my @arr = sort $sortfunc @$foo;
my @arr = do {local *sortfunc = $sortfunc; sort sortfunc @$foo};
In reply to Re: Pseudo-hash intrusion...
by runrig
in thread Pseudo-hash intrusion...
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |