- or download this
package A;
print "the global k in package B is $B::k\n";
- or download this
package main;
my $MW = ...; # Create your main window here.
sub UNIVERSAL::MW {$MW}
- or download this
# In the place/package where we want to create globals
use vars::global create => qw( $foo @bar %baz );
...
# If you're lazy, you can import all the globals defined so far
use vars::global ':all';
- or download this
package vars::global;
{
...
1; # Magic true value required at end of module
__END__
- or download this
*{$caller . '::' . substr $symbol, 1} = $ref;
- or download this
use vars::global qw( $these @exists ),
create => qw( $those @are %new );