in reply to Re: Another newb question
in thread Another newb question
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Another newb question
by dasgar (Priest) on Aug 08, 2012 at 06:28 UTC | |
by AnomalousMonk (Archbishop) on Aug 08, 2012 at 10:18 UTC | |
|
Re^3: Another newb question
by AnomalousMonk (Archbishop) on Aug 08, 2012 at 10:43 UTC | |
by davido (Cardinal) on Aug 08, 2012 at 16:32 UTC | |
by dasgar (Priest) on Aug 09, 2012 at 03:54 UTC | |
by Parmenides (Novice) on Aug 08, 2012 at 22:30 UTC | |
by dasgar (Priest) on Aug 09, 2012 at 03:40 UTC |