It's obscure, yes. But not for "no really good reason" but for avoiding an aditional variable. But now as I think of it ;-) Okay: It's no really good reasone. Maybe I should think about my taking part in perl-minigolf and obfuscation.

honestly, maybe i'm too in love with perl5, but i don't see what could be more elegant than your first example. it's a nice one liner that is not very obscure - maybe not the most optimized - but appropriate here.

humbly,novitiate"...goodnight you princes of main(e)" --The Cider House Rules