Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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

by roboticus (Chancellor)
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


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.


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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005859]
[stevieb]: thanks choroba for making the world right again by mentioning something as simple as a missing backslash ;)
[beech]: s/a/many a/\
[beech]: compare MANIFEST.SKIP

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2017-07-25 23:24 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (383 votes). Check out past polls.