Keep It Simple, Stupid | |
PerlMonks |
Re: What about if (my $var = foo()) { ... }by polettix (Vicar) |
on Dec 30, 2007 at 14:42 UTC ( [id://659609]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|