XP is just a number | |
PerlMonks |
Re: safe navigation in perl?by Your Mother (Archbishop) |
on Dec 17, 2017 at 05:37 UTC ( [id://1205722]=note: print w/replies, xml ) | Need Help?? |
I'm with AnomalousMonk. I use that kind of idiom sometimes but I like the two statement version fine. There is (mostly) nothing wrong with this either, eval { $dom->find($whatever)->delete }, though I wouldn't do it in case of __DIE__ handling getting noisy somewhere else in the code or the consumers of it. If you are remembering right and there is an interesting trick to do it inline, I'd certainly like to see/learn it.
In Section
Seekers of Perl Wisdom
|
|