Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Storing simple Value Pairs

by pvaldes (Chaplain)
on Oct 19, 2011 at 18:44 UTC ( #932466=note: print w/replies, xml ) Need Help??


in reply to Storing simple Value Pairs

what about a simple list? i.e.:

 my @list = ('23/34', '34/56', '45/01');

is trivial to convert this to the original pair with split, sort the list, etc

foreach $pair(@list){ my ($x,$y) = split /\//, $pair, 2; print $y," is paired with ", $x, "\n"; } __END__ 34 is paired with 23 56 is paired with 34 01 is paired with 45

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2016-10-01 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (7 votes). Check out past polls.