in reply to Re^2: Another newb question
in thread Another newb question
But all the Perls I have in captivity recognize a syntax error for the line missing the semicolon, although they make no mention of the semicolon itself.
>perl -le "use warnings ; use strict ; print \"This program will display ... when done.\n\" my @userin = <STDIN> ; printf \"%-20s\", @userin ; " syntax error at -e line 1, near ""This program will display ... when d +one.\n" my " Global symbol "@userin" requires explicit package name at -e line 1. Global symbol "@userin" requires explicit package name at -e line 1. Execution of -e aborted due to compilation errors.
If my own experience is any guide, what happened is that Parmenides, momentarily unable to interpret the first (and critical) error message, was drawn to concentrate on the subsequent 'error' message unaware that it was entirely an artifact of the preceding error. A very common oversight (again, IME). The lesson: Pay strict attention to the point at which the compiler first stumbles and don't be distracted by the point at which it finally bites the dust.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Another newb question
by davido (Cardinal) on Aug 08, 2012 at 16:32 UTC | |
|
Re^4: Another newb question
by dasgar (Priest) on Aug 09, 2012 at 03:54 UTC | |
|
Re^4: Another newb question
by Parmenides (Novice) on Aug 08, 2012 at 22:30 UTC | |
by dasgar (Priest) on Aug 09, 2012 at 03:40 UTC |