in reply to Re^9: Shouldn't references be readonly?
in thread Shouldn't LITERAL references be readonly? (updated)
sure see Re^6: Shouldn't references be readonly?
DB<76> sub change { $_[0] = 666 } DB<77> $a=42 DB<78> change($a) DB<79> p $a 666 DB<80> change(42) Modification of a read-only value attempted at (eval 86)[c:/Perl_524/l +ib/perl5db.pl:737] line 2. DB<81>
still "lame"?
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
update
BUT!!!
DB<81> sub change_arr { $_[0] = [666] } DB<82> $a=[42] DB<83> change_arr($a) DB<84> x $a 0 ARRAY(0x3363180) 0 666 DB<85> change_arr([42]) #NO ERROR??? DB<86>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^11: Shouldn't references be readonly?
by jo37 (Deacon) on Aug 05, 2020 at 19:48 UTC | |
by LanX (Saint) on Aug 05, 2020 at 20:18 UTC | |
by jo37 (Deacon) on Aug 06, 2020 at 07:15 UTC | |
by LanX (Saint) on Aug 07, 2020 at 12:23 UTC |
In Section
Seekers of Perl Wisdom