Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

sorting an array of objects (surely it should be easy!)

by jfrm (Monk)
on Jul 03, 2007 at 13:44 UTC ( [id://624681]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print "££".$unsorted[0]->function."<br>";
    @sorted = sort {$unsorted[$a]->function <=> $unsorted[$b]->function} @
    +unsorted;
    
  2. or download this
    Use of reference "GARD::Book=HASH(0x2b7831c)" as array index at db.pl 
    +line 439.
    Can't call method "function" on unblessed reference at db.pl line 439.
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-18 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found