in reply to Array splice ??
But this looks wierd:
push (@temp, $hash); push @lookup, @temp;
That happens in a loop. Inside the loop, @temp isn't cleared. So, if you go through the loop twice, the first hash will pushed to @lookup twice. If you go three times through the loop, in total 6 times a hash will be pushed on @lookup, in the order: 1, 1, 2, 1, 2, 3. And after a fourth iteration, @lookup will have: 1, 1, 2, 1, 2, 3, 1, 2, 3, 4 as pushed hashes. Unless you have lines matching "Date", then $hash is pushed an extra time on @temp.
Oh, to further complicate things, there's just one $hash. Nothing local or lexical to the loop.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Array splice ??
by crouchingpenguin (Priest) on Feb 26, 2003 at 17:24 UTC |