in reply to how to loop through many arrays
Perl has many tools for operating on arrays:use warnings; use strict; my @array1=(1,2,3,4,8); my @array2=(1,4,2,4,5); my @array3=(1,6,1,7,5); foreach my $element (@array1, @array2, @array3){ if ($element == 1){ ##do something; } }
Update: my solution was posted before the OP's UPDATE.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to loop through many arrays
by david_lyon (Sexton) on Jun 19, 2011 at 06:46 UTC |