<?xml version="1.0" encoding="windows-1252"?>
<node id="737393" title="(nearly) readonly globals" created="2009-01-19 15:12:48" updated="2009-01-19 15:12:48">
<type id="115">
perlquestion</type>
<author id="341073">
haoess</author>
<data>
<field name="doctext">
&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I played a little bit with the vars listed in [doc://perlvar], and there are some inconsistent behaviours (using v5.10.0). Before filling a bug report, I would like to discuss these issues:&lt;p&gt;

&lt;code&gt;
% perl -e '$$=1'
Modification of a read-only value attempted at -e line 1.

% perl -e 'local $$=1'

%
&lt;/code&gt;

&lt;p&gt;&lt;c&gt;$$&lt;/c&gt; is listed as &lt;i&gt;read-only&lt;/i&gt;.&lt;/p&gt;

&lt;p&gt;Same is for other special globals like &lt;c&gt;$]&lt;/c&gt;, &lt;c&gt;$^{TAINT}&lt;/c&gt;, &lt;c&gt;$^{UNICODE}&lt;/c&gt;, and &lt;c&gt;$^V&lt;/c&gt;.&lt;/p&gt;

&lt;p&gt;Is there a bug? Are the docs ambiguous?&lt;/p&gt;

&lt;p&gt;-- Frank&lt;/p&gt;</field>
</data>
</node>
