<?xml version="1.0" encoding="windows-1252"?>
<node id="1005740" title="Re^2: What is the scope of $_?" created="2012-11-26 13:40:22" updated="2012-11-26 13:40:22">
<type id="11">
note</type>
<author id="712372">
kennethk</author>
<data>
<field name="doctext">
&amp;lt;tangent&amp;gt; How is &lt;c&gt;@_&lt;/c&gt; not global in scope?  I mean, it gets implicitly [doc://local]ized on any subroutine call, but it's present by default and package independent:
&lt;c&gt;use strict;
use warnings;

@_ = @ARGV;

package Foo;

print for @_;
@_ = qw(1 2 3 4 5);
{
    local @_ = reverse @_;
    print for @_;
}

package main;

print for @_;
&lt;/c&gt;
&amp;lt;/tangent&amp;gt;
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-712372"&gt;
&lt;hr /&gt;
&lt;p&gt;#11929 First ask yourself `How would I do this without a computer?'  Then have the computer do it the same way.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1005679</field>
<field name="parent_node">
1005709</field>
</data>
</node>
