in reply to look up the symbol table of a variable
When I try:
use strict; use Foo::Bar; my $package = 'Foo::Bar'; for my $sym ( keys %{ $::{ "${package}::" } } ) { print "$sym\n"; } [download]
use strict; use Foo::Bar; my $package = 'Foo::Bar'; { no strict q(refs); for my $sym ( keys %{ "${package}::" } ) { print "$sym\n"; } } __END__ PI import [download]
package Foo::Bar; $PI = 3.14; __END__ [download]
Update: Simplified code a bit.
the lowliest monk