diff options
author | Paul David Fardy <pdf@morgan.ucs.mun.ca> | 2000-08-17 14:53:40 -0230 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-18 13:26:14 +0000 |
commit | c567402153be05de9e4e6ef0b23195e50431c6d8 (patch) | |
tree | 25c9e32c76616b663e67747ab4648578ade24845 /pod/perldiag.pod | |
parent | 194e7b382bb28b53644a2ea16df2fe5fda9ad386 (diff) | |
download | perl-c567402153be05de9e4e6ef0b23195e50431c6d8.tar.gz |
[ID 20000817.018] behaviour change 5.5.3 -> 5.6.0 re "Modification of a read-only value"
Message-Id: <200008171953.RAA17673@porthos.ucs.mun.ca>
p4raw-id: //depot/perl@6696
Diffstat (limited to 'pod/perldiag.pod')
-rw-r--r-- | pod/perldiag.pod | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod index b55c7dfbc4..6f62e3c596 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1865,6 +1865,14 @@ catches that. But an easy way to do the same thing is: Another way is to assign to a substr() that's off the end of the string. +Yet another way is to assign to a C<foreach> loop I<VAR> when I<VAR> +is aliased to a constant in the look I<LIST>: + + $x = 1; + foreach my $n ($x, 2) { + $n *= 2; # modifies the $x, but fails on attempt to modify the 2 + } + =item Modification of non-creatable array value attempted, %s (F) You tried to make an array value spring into existence, and the |