* Sean <educated_foo@yahoo.com> [2009-12-09 17:45]: > None of the alternatives I have tried does what I want: But the right combination would. > main @> keys %test:: > undef > main @> %{"test::h"} ? 1 : 0 > 0 > main @> keys %test:: > 'h' > main @> defined %{"test::h2"} ? 1 : 0 > 0 > main @> keys %test:: > 'h' > main @> *{"test::h3"}{HASH} ? 1 : 0 > 0 > main @> keys %test:: > h h3 > main @> defined *{"test::h4"}{HASH} ? 1 : 0 > 0 > main @> keys %test:: > h h3 h4 defined ( $test::{'h5'} && *{$test::{'h5'}}{HASH} ) In fact you can leave out the `defined`. The only possible values are references and undefs anyway. -- *AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1} &Just->another->Perl->hack; #Aristotle Pagaltzis // <http://plasmasturm.org/>Thread Previous | Thread Next