in reply to Re^3: Processing a dynamic array
in thread Processing a dynamic array
at the end my loop and obviously it gives me the error Argument "http://www.perlmonks.com/" isn't numeric in modulus (%) which makes sense. Then i try just puttingmy $first = shift @links; push @links, $first / 2 if (!($first % 2));
at the end of my code but that doesn't seem to work either.my $first = shift @links; push @links, $first;
The way i see it, when we shift $first from an array and add it to the end of the array doesn't that mean that $first will be processed again after all the current elements are processed, when we reach that again? I might have the wrong idea for this so could someone please explain? Thanks in advance P.S: The "Argument "http://www.perlmonks.com/" isn't numeric in modulus (%)" is only for reference i havent used the perlmonks website in my loop!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Processing a dynamic array
by pg (Canon) on Oct 29, 2005 at 23:29 UTC |