> From: John W. Krahn wrote:
> Jason Corbett wrote:
> >
> > Hello. I am using variables that are local in my scripts by doing the my
> > $variable_name technique.
> >
> > Can someone tell me if there is an official way to define a global variable?
>
> Perl doesn't really have "global" variab
Jason Corbett wrote:
>
> Hello. I am using variables that are local in my scripts by doing the my
> $variable_name technique.
>
> Can someone tell me if there is an official way to define a global variable?
Perl doesn't really have "global" variables (like BASIC does), except
for some of the sp
Jason Corbett wrote:
Can someone tell me if there is an official way to define a global
variable?
use vars qw($global1 $global2);
or
our ($global1, $global2);
The latter cannot be used in Perl versions previous than 5.6.0. Note
that the two methods do not do exactly the same thing; see the
Hello. I am using variables that are local in my scripts by doing the my
$variable_name technique.
Can someone tell me if there is an official way to define a global variable?