Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
XP is just a number
 
PerlMonks  

(tye)Re: divide by '/'

by tye (Sage)
on Apr 11, 2001 at 04:08 UTC ( [id://71587]=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 divide by '/'

Personally, I think I'd just go for:

my @sort= do { local( $^W )= 0; sort {$a<=>$b} @list; }
Those strings in a numeric context will compare properly but would produce warnings so I disable warnings. Also, each strings will only be converted to a number once after which that value will be cached in the SV (scalar value) making later comparisons as fast as is possible in Perl.

        - tye (but my friends call me "Tye")

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://71587]
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.