Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Alias of hash-values?

by LanX (Canon)
on Feb 20, 2013 at 16:58 UTC ( #1019807=note: print w/ replies, xml ) Need Help??


in reply to Re: Alias of hash-values?
in thread Alias of hash-values?

> The thing that surprises me though is that trying to increment the hash keys doesn't die like this one:

Yeah, that was an implicit question.

So anything which is an lvalue in Perl can be aliased in foreach or @_ ?

Cheers Rolf


Comment on Re^2: Alias of hash-values?
Select or Download Code
Re^3: Alias of hash-values?
by LanX (Canon) on Feb 20, 2013 at 22:36 UTC
    > So anything which is an lvalue in Perl can be aliased in foreach or @_ ?

    yep, seems to be the case!

    $a=41; sub tst :lvalue { $a } $_++ for tst(); print tst(); # prints 42

    Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1019807]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2015-07-05 13:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls