in reply to Passing multiple arrays to foreach loop

This will work and you will itterate a list containing each element from each array. If you should want to be able to tell which array is which then you can itterate references instead.

use strict; use warnings; my @foo = qw(one two three); my @bar = qw(four five six); my @baz = qw(seven eight nine); my $i = 0; for my $array_ref (\@foo, \@bar, \@baz) { # pass references print "starting array: ".++$i."\n"; for (@$array_ref) { # de-reference print " array: $i val: $_\n"; } }

Cheers,
R.

Pereant, qui ante nos nostra dixerunt!