Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Sorted tied hash wierdness

by Roger (Parson)
on Nov 18, 2003 at 19:03 UTC ( [id://308193]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Sorted tied hash wierdness

You can change the line:
$_->[0] <=> $_->[1]
to
$_[0] <=> $_[1]
or
@_->[0] <=> @_->[1]
and even insanely to
@{[shift]}->[0] <=> @{[shift]}->[0]
And it will work.

The last last solution is highly perl implementation dependent, it will not work if the order of evaluation changes in the future. I came up with it just to see if I could compare two shift's directly for fun. And yes it works. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://308193]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.