in reply to Array of Arrays with Variable Names

First off, it is very difficult to determine if there is a better way of structuring the data when you haven't presented us with any example data. This node on Re: How can I visualize my complex data structure? was suggested to me a while back and has been fantastically useful with trying to actually visualize my complex data structures. Especially when I am forced to work with data that I don't have control over how its handed to me.

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