foreach (@files) { @smallarray = ('$value1',$value2','$value3'); push(@largearray, [EMAIL PROTECTED]); }
or foreach (@files) { push(@largearray, ['$value1',$value2','$value3']); } -----Original Message----- From: Jim Canfield [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 02, 2004 10:40 PM To: [EMAIL PROTECTED] Subject: Appending an small array into a larger array in a foreach loop. Greetings, I'm having trouble creating an 2 dimensional array that contains the values of other smaller arrays. For example: foreach (@files) { #...Get values @smallarray = ('$value1',$value2','$value3'); #Append @smallarray to @largearray ??????? Help ME!! ?????? } The end result would be an array with all the small array values indexed in a larger array something like this... ( [ 0, "value1", "value2", "value3" ], [ 1, "value1", "value2", "value3" ], [ 2, "value1", "value2", "value3" ], [ 3, "value1", "value2", "value3" ], ); Any suggestions? Am I going about this the right way? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>