February 2012
Intermediate to advanced
1184 pages
37h 17m
English
use vars qw($frobbed @munge %seen);
This pragma, once used to declare a global variable, is now
unofficially deprecated in favor of the our modifier. The previous declaration is better
accomplished using:
our($frobbed, @munge, %seen);
or even:
our $frobbed = "F"; our @munge = "A" .. $frobbed; our %seen = ();
No matter which of these you use, remember that they’re talking about package globals, not file-scoped lexicals.
Read now
Unlock full access