All of the above methods will declare variables into the current package.package MyPkg; # use a pragma use vars qw( $foo @bar %baz ); # or declare the full path $MyPkg::foo = "this"; @MyPkg::bar = qw(that); %MyPkg::baz = ( the => 'other' ); # or declare the variables before 'use strict' $foo = "a string"; @bar = qw( an array ); %baz = ( a => 'hash' ); use strict; ...
_________
broquaint
In reply to Re: Exporting variable from Module (5.005)
by broquaint
in thread Exporting variable from Module (5.005)
by learn_forever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |