31.21. use vars
use vars qw($frobbed @munge %seen);
This pragma, once used to declare a global variable, is now somewhat deprecated in favor of the our modifier. The previous declaration is better accomplished using:
or even:our($frobbed, @munge, %seen);
No matter which of these you use, remember that they're talking about package globals, not file-scoped lexicals.our $frobbed = "F"; our @munge = "A" .. $frobbed; our %seen = ();
Copyright © 2002 O'Reilly & Associates. All rights reserved.