in reply to how to find a subroutine exists or not

What about plain old...

eval { test() }; if ( $@ =~ /Undefined subroutine/ ) { # we know it doesn't exits }

Oh, wait, I think I get it. We want to know if it exists before we run it...

Replies are listed 'Best First'.
Re^2: how to find a subroutine exists or not
by codeacrobat (Chaplain) on Apr 21, 2006 at 11:18 UTC
    eval { rm_min_rf_root() } was_lucky() if $@ =~ /Undefined subroutine/;
    ;-)