Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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??

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://659609]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-06-20 04:39 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.