Welcome to the Monastery | |
PerlMonks |
Re: eval: Why use the 'Zombie error' idiom?by cavac (Parson) |
on Oct 21, 2019 at 15:00 UTC ( [id://11107766]=note: print w/replies, xml ) | Need Help?? |
In the few cases i am forced to use eval, i usually do something like this:
This way, i don't have to deal with the error message. And in my personal opinion, it's much more readable. The downside, of course, is that Perl::Critic shouts at you - a lot.
perl -e 'use MIME::Base64; print decode_base64("4pmsIE5ldmVyIGdvbm5hIGdpdmUgeW91IHVwCiAgTmV2ZXIgZ29ubmEgbGV0IHlvdSBkb3duLi4uIOKZqwo=");'
In Section
Seekers of Perl Wisdom
|
|