princepawn has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
(jcwren) Re: syntax error not detected by Perl compiler
by jcwren (Prior) on Oct 18, 2000 at 23:09 UTC
    You don't have -w turned on.
    Unquoted string "p" may clash with future reserved word at t.pl line 1 +2. Useless use of a constant in void context at t.pl line 12. Name "main::count" used only once: possible typo at t.pl line 9. Use of uninitialized value in localtime at t.pl line 5. 31
    Turning on 'use strict' and -w gives the following:
    [jcw@linux mm]$ perl t.pl Global symbol "$x" requires explicit package name at t.pl line 6. Global symbol "$t" requires explicit package name at t.pl line 7. Global symbol "$x" requires explicit package name at t.pl line 7. Global symbol "$t" requires explicit package name at t.pl line 8. Global symbol "$count" requires explicit package name at t.pl line 11. Bareword "p" not allowed while "strict subs" in use at t.pl line 14. Execution of t.pl aborted due to compilation errors.


    --Chris

    e-mail jcwren
Re: syntax error not detected by Perl compiler
by Fastolfe (Vicar) on Oct 18, 2000 at 23:10 UTC
    Perl is probably turning the p into a "p", which is effectively a no-op there.