P is for Practical | |
PerlMonks |
Re: Can I catch a die from someone else's module?by kcott (Archbishop) |
on Apr 18, 2022 at 19:59 UTC ( [id://11143063]=note: print w/replies, xml ) | Need Help?? |
G'day bartender1382, I had a look in Spreadsheet::Read but can't find the "If a file cannot be found ..." message you reported. Perhaps it's not an error message but private feedback from the module's author. Regardless, I have no context for the die() or what it's reporting. Having said that, I suspect what you want is eval. Compare the following two short pieces of code and their output. Here's the type of scenario I think you're dealing with:
Output:
Here's a modification of that code to do what I think you want:
Output:
If that's not what you want, please provide more context for the problem to help us to help you. — Ken
In Section
Seekers of Perl Wisdom
|
|