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

Re: Re: Sorting an array of strings by number

by Albannach (Prior)
on Oct 01, 2001 at 17:27 UTC ( #115856=note: print w/ replies, xml ) Need Help??


in reply to Re: Sorting an array of strings by number
in thread Sorting an array of strings by number

Note that in your option 3 the unique keys of the hash will be likely to clobber some data as the anonymonk specified that the first value is price in his problem. Hashes are great for many reasons but this example is easily and simply addressed by a simple numerical sort so unless there is reason to need to search the data by price, and a certainty of unique pricing, I'll go with one of your first two options.

--
I'd like to be able to assign to an luser


Comment on Re: Re: Sorting an array of strings by number

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-12-20 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (97 votes), past polls