while loops as long a boolean expression is true.
This can be used together with an iterator, like while($x=iter()) .
There is no general automatism to set $_ like your example implies, that's just magic behavior of the file iterator <> in scalar context. that boolean context.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re: Internally, how do for() and while() differ?
by LanX
in thread Internally, how do for() and while() differ?
by stevieb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |