Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Building an anonymous function

by BorgCopyeditor (Friar)
on Aug 11, 2002 at 06:19 UTC ( #189271=note: print w/replies, xml ) Need Help??


in reply to Re: Closures
in thread Building an anonymous subroutine

Thanks. It looks obvious ... now that I've seen a solution. :) I ended up doing it inside out, as it were, initially defining an anonymous sub just for the part of the enclosing sub that needed differing behaviors, and calling that within that enclosing sub.

The conditional assignment thingy with nested ternary '?'s is very elegant, I think.

Thanks again,

BCE

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://189271]
help
Chatterbox?
[Veltro]: Lol, think this is the best one: Why donít I just use Googleís thing? -You think thatís going to be around in 6 months?
[marto]: well, they have retired many products and services

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2018-05-24 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?