in reply to Matching Values in Arrays
You want a hash or an array to store references to your three arrays. http://perl.plover.com/varvarname.html has a better explanation of how to approach your problem than I can ever write.
The short of it is that you want:
my @arrays = (\@array1, \@array2, \@array3); for my $row (0..$#${ $arrays[0] }) { print "$row: "; for my $array (@arrays) { print $array->[$row], ";"; }; print "\n"; };
Also see tye's References Quick Reference for more information about references
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Matching Values in Arrays
by mikejones (Scribe) on Aug 07, 2007 at 17:52 UTC | |
by mikejones (Scribe) on Aug 07, 2007 at 19:36 UTC |