Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Modification of a read-only value attempted

by roboticus (Canon)
on Nov 27, 2012 at 13:48 UTC ( #1005859=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Modification of a read-only value attempted
in thread Modification of a read-only value attempted

panku:

You can change $c=1000. What you can't do is change 99 to 1000. When you use $c=1000, it tells perl that $c is no longer pointing to a reference to the constant 99, but is now containing the value 1000. When you use $$c=1000, you're telling perl to change the thing $c points to to 1000. But $c points to the constant value 99. Perl is telling you that it refuses to break the time-space continuum by making 99 be 1000.

...roboticus

When your only tool is a hammer, all problems look like your thumb.


Comment on Re^3: Modification of a read-only value attempted
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-10-25 09:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (142 votes), past polls