Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: ref to read-only alias ... why?

by Eliya (Vicar)
on Jan 05, 2012 at 23:28 UTC ( #946495=note: print w/ replies, xml ) Need Help??


in reply to Re: ref to read-only alias ... why?
in thread ref to read-only alias ... why?

In your case, $_ is an alias for the constant 1, not an lvalue, so can't be assigned to.

This doesn't really answer the OP's question why it does not fail when you try to modify the constant via a reference to the alias.


Comment on Re^2: ref to read-only alias ... why?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-12-28 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (181 votes), past polls