When you're using lists, ask yourself if it could be done more easily with a hash.
In my opinion, they address different problems. Arrays are an ordered set of things, hashes are an unordered set of associations. Sure, if you find yourself doing something like this:
my (@item, @color);
while(<DATA>) {
chomp;
my($item, $color) = split(/,/);
push @item, $item;
push @color, $color;
}
for(my $i=0; $i < @item; $i++) {
print "$item[$i] has color $color[$i]\n";
}
__DATA__
apple,red
orange,orange
banana,yellow
then yes...use a hash. Don't try to shoehorn it, though.
thor
The only easy day was yesterday