Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Pseudo-hash intrusion...

by runrig (Abbot)
on Jun 21, 2001 at 18:59 UTC ( [id://90387]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    my $foo = [ {blah=>'aaa'},{blah=>'ddd'},{blah=>'ccc'} ];
    ...
    my $sortfunc = sub { $a->{blah} cmp $b->{blah} };
    
    my @arr = sort $sortfunc @$foo;
    
  2. or download this
    my @arr = do {local *sortfunc = $sortfunc; sort sortfunc @$foo};
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://90387]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-04-19 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found