Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: sort in array of hash required

by AnomalousMonk (Archbishop)
on Nov 16, 2011 at 17:04 UTC ( [id://938419]=note: print w/replies, xml ) Need Help??


in reply to Re^2: sort in array of hash required
in thread sort in array of hash required

How could I optimize ...

Note that johngg's approach of Re^3: sort in array of hash required is not an 'optimization' in the sense of execution speed; I doubt it would run significantly, if at all, faster.

However, it offers, IMHO, potential significant advantages in terms of maintainability. E.g., the group of keys  keynum keyname name can be factored out (if you could get rid of that pesky '#' that's buzzing around in there) into an array definition (possibly made a constant) and used in many places without concern for having 'forgotten something'. If it becomes necessary to change anything about this group of keys, it is only necessary to do so in one place.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (8)
As of 2024-03-28 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found