Moreover, how to know whether an arbitrary package has a specific global?use strict; { package Foo; our $str = 'foo str'; } { package Bar; our $str = 'bar str'; } my $class = 'Foo'; # access Foo::str using soft ref my $value; { no strict 'refs'; my $soft = $class.'::str'; $value = $$soft; } # So, how to get $Foo::Str without soft ref?
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |