http://www.perlmonks.org?node_id=932466


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