in reply to Can I catch exceptions
try a combination of eval and die for that. ex:
eval { if .... { die 'Error Message 1'; else { die 'Error Message 2'; } }; [download]