use strict; sub hubba { } for my $symbol qw(hubba bubba) { print "$_: "; print defined *My::$symbol{CODE} ? "yep": "nope"; print "\n"; }