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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Storing simple Value Pairs
by raybies (Chaplain) on Oct 19, 2011 at 18:57 UTC |