Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2016-12-08 01:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (133 votes). Check out past polls.