- or download this
{
package Foo::Bar::Baz;
our $x = 123;
}
- or download this
$ns = 'Foo::Bar::Baz::';
$ref = \${ $::{$ns}{x} };
- or download this
$ns = 'Foo::Bar::Baz';
my $stash = \%::;
...
}
$ref = \${ $stash->{x} };
- or download this
{
no strict 'refs';
$ref = \${ "Foo::Bar::Baz::x" };
}