{ no strict qw/refs vars/; local $varname = 'bar'; local $fullname = "Foo::$varname"; foreach my $type ( qw ) { print $type if (defined *{$fullname}{$type} and !($type eq 'SCALAR' and !defined($$fullname)) ); } }