in reply to safe navigation in perl?
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.
|
|---|