removing error meesage when using sctrict

Discussion in 'Perl Misc' started by Ben, Sep 4, 2003.

  1. Ben

    Ben Guest

    Hi,

    I wrote a simple script (45 lines, no functions) that defines some
    variables. I decided to "use strict" for a change and it came up with
    errors along the following lines:

    Global symbol "$ofile" requires explicit package name at ./fileParser.pl
    line 43

    Is there any way I can remove the error without going through the file
    and replacing the variables with $main::variable?

    Thanks,
    Ben


    --
    BTW. I can be contacted at Username:newsgroup4.replies.benaltw
    Domain:xoxy.net
     
    Ben, Sep 4, 2003
    #1
    1. Advertising

  2. Ben

    John Bokma Guest

    Ben wrote:

    > Hi,
    >
    > I wrote a simple script (45 lines, no functions) that defines some
    > variables. I decided to "use strict" for a change and it came up with
    > errors along the following lines:
    >
    > Global symbol "$ofile" requires explicit package name at ./fileParser.pl
    > line 43


    my $ofile;

    --
    Kind regards, feel free to mail: mail(at)johnbokma.com (or reply)
    virtual home: http://johnbokma.com/ ICQ: 218175426
    John web site hints: http://johnbokma.com/websitedesign/
     
    John Bokma, Sep 4, 2003
    #2
    1. Advertising

  3. Ben

    Ben Guest

    John Bokma wrote:
    >> I wrote a simple script (45 lines, no functions) that defines some
    >> variables. I decided to "use strict" for a change and it came up with
    >> errors along the following lines:
    >>
    >> Global symbol "$ofile" requires explicit package name at
    >> ./fileParser.pl line 43

    >
    >
    > my $ofile;


    Thanks. I had 'my' in there and removed them for some stupid reason.

    regards,
    Ben

    --
    BTW. I can be contacted at Username:newsgroup4.replies.benaltw
    Domain:xoxy.net
     
    Ben, Sep 4, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. qwweeeit
    Replies:
    16
    Views:
    495
    M.E.Farmer
    Apr 22, 2005
  2. Chris  Chiasson
    Replies:
    6
    Views:
    624
    Richard Tobin
    Nov 14, 2006
  3. brekehan
    Replies:
    2
    Views:
    333
    Marcus Kwok
    Mar 14, 2007
  4. Andyza
    Replies:
    4
    Views:
    317
    Anthony Jones
    Feb 17, 2006
  5. froil
    Replies:
    3
    Views:
    121
    Bart Van der Donck
    Apr 27, 2006
Loading...

Share This Page