http://www.perlmonks.org?node_id=1005740


in reply to Re: What is the scope of $_?
in thread What is the scope of $_?

<tangent> How is @_ not global in scope? I mean, it gets implicitly localized on any subroutine call, but it's present by default and package independent:
use strict; use warnings; @_ = @ARGV; package Foo; print for @_; @_ = qw(1 2 3 4 5); { local @_ = reverse @_; print for @_; } package main; print for @_;
</tangent>

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.