John W. Krahn wrote:
If you use the package name then you don't need to use our():
$ perl -Mwarnings -Mstrict -le'$main::var = q[test]; print $main::var'
test
John
True.
But if you don't use 'our' you would always have to use its
fully-qualified name.
$main::please_die = 0;
$SIG{TERM} = sub { $main::please_die = 1; };
instead of:
our $please_die = 0;
$SIG{TERM} = sub { $please_die = 1; };
Of course, you could shorten your keystrokes by using '$::please_die'
--
Just my 0.00000002 million dollars worth,
--- Shawn
"For the things we have to learn before we can do them,
we learn by doing them."
Aristotle
"The man who sets out to carry a cat by its tail learns something that
will always be useful and which will never grow dim or doubtful."
Mark Twain
"Believe in the Divine, but paddle away from the rocks."
Hindu Proverb
* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>