CodeToad Forums » Perl » Using shift while looping through multidimensional array using foreach
|
|
|
Does anyone have any advice on how to chop off the first member in a multidimensional array?
Here's some sample data:
492000 200003 108352 2008
492000 200003 108352 2007
492000 200003 108352 2006
492000 200003 108352 2005
Here's some sample code:
foreach ( @memArray )
{
#do some stuff
shift(@memArray)
}
When I use shift within the foreach loop, it seems to be removing the wrong "rows" in the array. Has anyone had any experience with this? Any help would be much appreciated.
|
|
|
|
|
|
|
// |