in reply to Undefined subroutine &main error

Just want to clarify something real fast. I believe that perl -c filename will only check for syntax errors, while  perl -w will get runtime warnings. That's why you don't get an error with -c, because an undefined sub isn't going to be an error until runtime.

You can mix the parameters as well by doing perl -cw, that will give you both.

Lobster Aliens Are attacking the world!

Replies are listed 'Best First'.
Re: Re: Undefined subroutine &main error
by skki (Initiate) on Mar 08, 2003 at 00:59 UTC
    in reply to the last coment from cfreak
    >You can mix the parameters as well by doing perl -cw, that will give you both.<

    so, i fixed the spelling of "use CGI qw(:sandard -debug);"
    and it worked fine.
    your suggestion of using 'perl -cw' (tried -wc also) checking only syntax and not reaching runtime.
    "...\exc\bonus>perl -wc bonus1.pl
    bonus1.pl syntax OK" same return from -cw.
    Thnx anyway.