in reply to Getting a list of sub routines
my @subs = grep { defined &{ $_ } } keys %Your::Package::;
Update: I probably should have also mentioned that if you're doing this from a different package, you'll need to prepend the package name to make sure you're checking for defined-ness in the right symbol table. E.g.
package Foo; sub foo { } sub bar { } sub baz { } package Bar; my @subs = grep { defined &{ "Foo::$_" } } keys %Foo::; print join "\n", @subs;
|
|---|