Great advice on the semicolon. Perl doesn't always recognize when it's missing (if it could recognize reliably, it would be an unnecessary bit of syntax). Consequently, the error messages that show up (or errant behavior) when one is missing don't always seem to gybe with what the problem actually turns out to be.
Unless I'm mistaken...
Mistaken:
perl -e 'my @array = <STDIN>; print "$_\n" for @array;'Even if the input were routed to STDIN by shell redirection it's still quite possible for the input record separator to be a part of the input stream.
Those are always famous last words, aren't they? ;)
Dave
In reply to Re^2: Another newb question
by davido
in thread Another newb question
by Parmenides
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |