in reply to Re^4: Easiest way to do something only on first iteration of loop
in thread Easiest way to do something only on first iteration of loop
I played with your code and even if the for loops are in a subroutine, the state version of $x is never re-initialized. In the documentation, my brain got stuck when the first sentence compared it to a my variable, causing a brain cramping mis-reading of the rest! Great that we have more eyeballs than mine on this stuff!
One thing I didn't test was behavior in threads. I am not sure what would happen.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Easiest way to do something only on first iteration of loop
by BrowserUk (Patriarch) on May 08, 2016 at 12:48 UTC |