Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: Experimenting with Lvalue Subs

by dragonchild (Archbishop)
on Jan 24, 2005 at 18:23 UTC ( #424652=note: print w/replies, xml ) Need Help??

in reply to Re: Experimenting with Lvalue Subs
in thread Experimenting with Lvalue Subs

By placing it into the scalar slot associated of the typeglob of the functions name.

That's not so good - you run the risk of clobbering something. Doing an implicit 'local' might help, but what do you do with lvalue-able anonymous subs?

*^_ is a much better idea, imho. And, I'd just have it go to @^_ straight off. That way, it would act as a standard assignment does. $foo = 1..3; anyone?

(FYI - it's mnemonic, not pnemonic ... you want memory, not the plague.)

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Replies are listed 'Best First'.
Re^3: Experimenting with Lvalue Subs
by BrowserUk (Pope) on Jan 24, 2005 at 18:41 UTC
    ...but what do you do with lvalue-able anonymous subs?

    Good point. Then I agree, @^_ is best.

    Examine what is said, not who speaks.
    Silence betokens consent.
    Love the truth but pardon error.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://424652]
[ozboomer]: Howdy, all.. Trying this once more... Not really a perl question :(... but I don't know how to even title my query (more...)
[ozboomer]: There's a text file with lots of sections in it, like an '.ini/.conf' file. Each section can be 'used' or 'unused' by its application (more...)
[ozboomer]: Some folk want to use the text file as 'storage', keeping ALL items in it (a database); others call it an 'active document' that should only contain 'in-use' sections. Is there a 'good practice' for this sort of thing?

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2018-05-21 00:19 GMT
Find Nodes?
    Voting Booth?