Citeren sorourke@ucsd.edu: > I'm trying to figure out the "right" way to dig through a > program's symbol table without disrupting it. According to the > docs, "defined" only works for scalars and subs. I would think > that "defined *{FOO}{THING}" would work for everything, but it > exhibits this annoying behavior: > > $ perl -le 'sub x{};for (qw(SCALAR ARRAY HASH CODE IO)) { print > "foo-thing $_" if defined *{x}{$_}; }' > foo-thing SCALAR > foo-thing CODE > > Indeed, if any other slot is defined, *{FOO}{SCALAR} seems to be > defined. Is this intended behavior? > > I am currently using *{FOO}{THING} for everything but scalars, > and (afterwards) "defined $FOO" for scalars, but it seems like > there should be a better way. > > Sean > Did you consider Devel::Symdump?Thread Previous | Thread Next