in reply to Strict Usage

Howdy!

Note that the error message says that an explicit package name is required...
One could go to the trouble of saying $main::thingy (even without 'use strict') to mean the thingy in the main symbol table. Sometimes this is real handy when you want to diddle package variables from outside the package. Some packages even document variables for you to use this way (Data::Dumper comes to mind).

On the other hand, most of the time, you probably wanted to use "my" anyway...

yours,
Michael

Replies are listed 'Best First'.
Re: Re: Strict Usage
by dragonchild (Archbishop) on Aug 22, 2001 at 21:10 UTC
    Before you think of doing this, please check out 100879 for more info. $main::thingy is extremely fraught with danger. As is, "diddling with package variables". (Any computer programming use of the word 'diddle' should be suspect from the outset!)

    ------
    /me wants to be the brightest bulb in the chandelier!

    Vote paco for President!