in reply to What about if (my $var = foo()) { ... }
This issue was discussed -- "inside-out" -- some time ago, starting from this post from merlyn and more or less ending with this reply from TheDamian.
I would also add that the idiom could be useful even when the function is pure, but heavy on CPU. Just as a form of self-baked cache.
Hey! Up to Dec 16, 2007 I was named frodo72, take note of the change! Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf
In Section
Seekers of Perl Wisdom