in reply to Package variables
NEVERMIND. I figured it out already. I was going to check the vars pragma manpage *before* I posted this question, but it slipped my mind.
For the record, in case anyone else wants to know:
package Foo; use strict; use vars qw/$BAR/; $BAR = "baz"; package main; print $Foo::BAR;
So, use vars declares 'global' variables (global to the package) that aren't private like my().
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: Re: Package variables
by chromatic (Archbishop) on Apr 25, 2000 at 18:35 UTC | |
RE: Re: Package variables
by jbert (Priest) on Apr 25, 2000 at 18:09 UTC |