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

Re: Storing simple Value Pairs

by BrowserUk (Pope)
on Oct 19, 2011 at 18:48 UTC ( #932469=note: print w/ replies, xml ) Need Help??


in reply to Storing simple Value Pairs

I see no disadvantages with an AoA:

#! perl -slw use strict; use constant { X=>0, Y=>1 }; my @pairs = map[ int( rand 1000 ), int( rand 1000 ) ], 1 .. 1000; print join ' : ', $pairs[ 999 ][X], $pairs[ 999 ][Y]; print join ' : ', @{ $pairs[ 500 ] }; __END__ C:\test>junk22 935 : 575 669 : 471

Do you?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: Storing simple Value Pairs
Download Code
Re^2: Storing simple Value Pairs
by raybies (Chaplain) on Oct 19, 2011 at 18:57 UTC
    Clever!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2015-07-04 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls