NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Anon subs work in sort as of 5.6.2 (Score:1)
As far as I understand perlfunc, sort accepts refs to anonymous subs. And I use such code all the time:
sort $sorter{$field}, @objs;Reply to This
Re:Anon subs work in sort as of 5.6.2 (Score:1)
Re:Anon subs work in sort as of 5.6.2 (Score:2)
Oops. You're quite right.
I tried it along time ago and found out it didn't work. I suppose I should have tried again :)