in reply to Re: risk of confusion
in thread risk of confusion
each $_ is localized to its own while() block.
I'm sorry, that is false. Are you getting while confused with foreach?
As it says in When to Still Use local():
it's important to localize $_ in any routine that assigns to it. Look out for implicit assignments in while conditionals.So the correct answer to the OP is actually Yes, there will be "confusion". local can be used to remedy the problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: risk of confusion
by shmem (Chancellor) on Aug 07, 2007 at 21:53 UTC |