Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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


Comment on Re: Storing simple Value Pairs
Select or Download Code

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 perusing the Monastery: (14)
As of 2014-07-31 18:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (250 votes), past polls