Pretty much how you have written it use strict; use vars qw(@a @b @c @d); @a=(1,2,3,4); @b=(5,6,7,8); @c=(9,10,11,12); @d=(13,14,15,16);
foreach (@a,@b,@c,@d) { # #do what you like here # } If that's really what you want to do, You can also join all the hashes together, use a hash etc... it all depends on what you actually want to do/how static your structures are etc... -----Original Message----- From: Pat Rice [mailto:[EMAIL PROTECTED] Sent: 05 November 2007 15:34 To: Perl beginners Subject: how do do work on a whole bunch of arrays in parrel hi all I would like to know how to do the following I have a whole bunch of arrays eg var1 var2 var3 var4 var5 var6 var7 and I need each of them to be processed, in the one foreach loop, eg foreach var(@var1, @var2, @var3, @var4, @var5, @var6){ Do somthing here on each var } is this passable, an how would I do it, basically I am looking for guidance here on how to do this, from a Perl point of view, would hashes be the answer ? Thanks Pat This e-mail is from the PA Group. For more information, see www.thepagroup.com. This e-mail may contain confidential information. Only the addressee is permitted to read, copy, distribute or otherwise use this email or any attachments. If you have received it in error, please contact the sender immediately. Any opinion expressed in this e-mail is personal to the sender and may not reflect the opinion of the PA Group. Any e-mail reply to this address may be subject to interception or monitoring for operational reasons or for lawful business practices. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/