|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re: Re: Re: Re: Non-destructive array processingby Ovid (Cardinal) |
| on Jan 20, 2003 at 22:54 UTC ( #228516=note: print w/ replies, xml ) | Need Help?? |
|
Whoa! You're right. That doesn't seem to be very DWIM. The following snippet does not alter the elements of @array.
However, by moving the auto-increment line above the while loop:
This looks like some weird "copy on write" behavior that I was not aware of. Is this new, or is it Yet Another Feature that I didn't know about? :) Update: Okay, I see that adrianh answered the question. Cheers, New address of my CGI Course.
In Section
Meditations
|
|
||||||||||||||||||||