in reply to Array of Arrays with Variable Names
That being said, have you considered an array of hashes. Since a hash is, at its simplest, an associative array, you can create an array with named hashes. But like I said before, without example data, its difficult to help you any further with organizing data.
Depending on how the datafile is structured (also something that would be helpful if you provide), you do something like the following:
@combined = split /,/, $opt_f;
Side note, I am a personal fan of using GetOpt::Std with the hash format this way I can always Data::Dumper all the options provided as opposed to just one at a time:
use Getopt::Std qw(getopts); getopts('f:', \%opt); if ($opt{'f'}) { ... } # Debug print Dumper (\%opt);
Eric
|
|---|