# In the place/package where we want to create globals use vars::global create => qw( $foo @bar %baz ); # Add some more global symbols vars::global->create(qw( $hello @world %now )); # Somewhere else, where we need to access those globals use vars::global qw( $foo @bar %baz ); # Don't try to use globals that do not exist use vars::global qw( $Foo ); # typo, croaks use vars::global qw( @inexistent ); # we don't create by default # use 'create' as above # You can also import and create new globals use vars::global qw( $foo %baz ), create => qw( $hey @joe ); # If you're lazy, you can import all the globals defined so far use vars::global ':all';