oh. I understood something else from your first post...
There are many ways to catch exceptions. You could use eval(), but using eval() will not work for warnings from the compiler, from the POD:
Beware that using "eval" neither silences perl from printing warnings
+to STDERR, nor does it stuff the text of warning messages into $@.
Or you can use Error as nite_man suggests, but I just made a couple of tests and read the docs and compiler warnings don't seem to be handled by it.
hope this helps, |