Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2016-10-23 08:59 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (300 votes). Check out past polls.