Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: What about if (my $var = foo()) { ... }

by polettix (Vicar)
on Dec 30, 2007 at 14:42 UTC ( #659609=note: print w/replies, xml ) Need Help??

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

Io ho capito... ma tu che hai detto?
  • Comment on Re: What about if (my $var = foo()) { ... }

Replies are listed 'Best First'.
Re^2: What about if (my $var = foo()) { ... }
by Limbic~Region (Chancellor) on Dec 30, 2007 at 15:50 UTC
    Thanks! I tried hard to find this thread when I posted this because I remembered it. Unfortunately, I misremembered TheDamian being the one providing the solution and thought he was the one asking the question. Using Super Search to find posts by TheDamian asking a question (not a reply) didn't help and so I gave up.

    Cheers - L~R

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://659609]
Discipulus hitting the edge: panic: gen_constant_list JMPENV_PUSH returned 2 at -e line 1.

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2018-02-21 13:42 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (280 votes). Check out past polls.