What do you expect this to do?
for ($input eq "end")for takes a list of values. $input eq "end" is an expression; for will loop over whatever that expression produces.
Improve your skills with Modern Perl: the free book.
In reply to Re: Problem with loops
by chromatic
in thread Problem with loops
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |