Re: The Proper way to define a global variable.

2004-06-23 Thread Chris Welch
> 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

Re: The Proper way to define a global variable.

2004-06-22 Thread John W. Krahn
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

Re: The Proper way to define a global variable.

2004-06-22 Thread Gunnar Hjalmarsson
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

The Proper way to define a global variable.

2004-06-22 Thread jason corbett
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?