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

Re^2: Sorting Outline Numbers

by hv (Prior)
on Aug 10, 2005 at 21:52 UTC ( [id://482830]=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 Re: Sorting Outline Numbers
in thread Sorting Outline Numbers

Using sprintf to recreate the numbers would be rather more efficient:

my @sorted = map sprintf('%vd', $_), sort map join('', map chr, split /\./), @data;

Hugo

Replies are listed 'Best First'.
Re^3: Sorting Outline Numbers
by japhy (Canon) on Aug 11, 2005 at 08:25 UTC
    Wow, I forgot entirely about that. I eschew the whole version-format idiom for numbers.

    Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
    How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Log In?
Username:
Password:

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