in reply to Re^11: The fallacy of the *requirement* for read-only instance variables.
in thread The fallacy of the *requirement* for read-only instance variables.
numbers being immutable.
Same address, different value. In Perl, numeric variables are mutable.
C:\test>perl -MDevel::Peek -E"my $x = 12345; Dump $x; $x ^= 1; Dump $x +" SV = IV(0x2174e0) at 0x2174e8 REFCNT = 1 FLAGS = (PADMY,IOK,pIOK) IV = 12345 SV = IV(0x2174e0) at 0x2174e8 REFCNT = 1 FLAGS = (PADMY,IOK,pIOK) IV = 12344
|
|---|