I'm not really following what you are trying to do, but it sounds to me like you need either a Hash of Arrays or an Array of Hashes (where the hashes are a single key => value pair and the value is your array) if you need to preserve order.
Hope this helps. :/#!/usr/bin/perl -l use strict; use warnings; my %unordered = ( foo => [qw(foo baz baz)], bar => [0 .. 9], ); print for @{ $unordered{foo} }; print "--------"; my @ordered = ( { foo => [qw(foo baz baz)] }, { bar => [0 .. 9] }, ); print for @{ $ordered[1]->{bar} };
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: Array of Arrays with Variable Names
by jeffa
in thread Array of Arrays with Variable Names
by JWM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |