I think you also want to be careful about the truthiness of your input values with while. See defined for an approach.
Update: Hmm, after testing, I am not sure on this advice. Possibly ignore me.
Update 2: confirmed -
while (<>) {...} ... is Perl shorthand for the more explicitly written ... while (defined($line = <ARGV>)) {...}
--MidLifeXis
In reply to Re: Internally, how do for() and while() differ?
by MidLifeXis
in thread Internally, how do for() and while() differ?
by stevieb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |