Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://424652]
help
Chatterbox?
[Corion]: Yay! As I had to reset my phone again, I now also back up my SMS automatically. Highly conveniently, there is a program to back up my SMS to my IMAP server as mails ;)
[1nickt]: Corion this is an android phone? If so, are you encountering problems with recent upgrades? Lately my phone dies suddenly quite often, seemingly coredumps caused by interaction of two actions, eg phone playing a sound and user swiping simultaneously :-/
[Corion]: 1nickt: Yeah, it's Android, but it's CM 11, so fairly old. I'm looking for a newer (china) phone, but I think I'll wait until Oreo ROMs get out for them
[Corion]: Otherwise, the Vernee Mars looks tempting
[Corion]: ... but alas, no Oreo support in sight yet, and I prefer to flash a stock Android over the custom ROMs, and Oreo promises to make the userland more maintainable.

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2017-11-18 15:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?