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

THere seems to have been a few changes on the perlmonk.org server over the weekend.
I'm now getting errors on all my scripts. The types of errors include -

Unquoted string "br" may clash with future reserved word at /home/mem/pub_html/MyVars.pm line 94.

index.cgi: Undefined subroutine &MyVars::a called at /home/baz/public_html/MyVars.pm line 9.

and heres the start of my index.cgi prog.
#!/usr/bin/perl -Tw use lib '/home/baz/public_html'; use strict; $| = 1; use CGI::Carp "fatalsToBrowser"; use CGI ":all"; use DBI; use HTML::TokeParser; use MyVars qw($footer);

What changes do I need to make?
Thanks.

Replies are listed 'Best First'.
(jeffa) Re: Perlmonk.org: Unquoted string "br"
by jeffa (Bishop) on Aug 11, 2002 at 23:19 UTC
    Yep, i had to make a few changes myself - your problem is not inside index.cgi, it is inside MyVars.pm:
    use CGI; # don't you mean use CGI qw(:standard); here?
    You are accessing CGI::a() and others as if you did. Add ':standard' or ':all' and you should be fine.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
Re: Perlmonk.org: Unquoted string "br"
by BrowserUk (Patriarch) on Aug 11, 2002 at 23:20 UTC

    Update:Going by Jeffa's post below, I should have stuck with my instincts.

    I'm probably wrong here, but I doubt that any changes at perlmonks.org are responsible for the errors you list.

    It would be much easier for people to help you if you included the relevant lines of code associated with the errors you list.

    I'm intrigued by the difference in the paths of the MyVars.pm in the error messages.

    /home/mem/pub_html/MyVars.pm line 94.

    /home/baz/public_html/MyVars.pm line 9.

    Typos?

      use CGI ":all";
      - got things movin' again, and yes the problem was MyVars.pm

      And I didnt realise I had an address in my code when I was posting, thence my made up directory and my actual one.

      Thanks.