in reply to Is there a way to catch an error within a module?

Judging by the info given in this thread, looks like an buffer overflow bug in File::Find. Appending "/.." when it should not.

Catching errors in Perl is done with the block form of eval. Something like:

eval { code_that_dies; } if ( $@ ne '' ) { code_to_recover_from_code_that_dies; }
There are modules to sugar the syntax; search for "error" and "exception" on CPAN.

Be well,
rir

Replies are listed 'Best First'.
Re^2: Is there a way to catch an error within a module?
by Anonymous Monk on Mar 23, 2008 at 09:27 UTC
    This is not buffer overflow