Perl5 リファレンス

       local EXPR
               You really probably want to be using `my' instead,
               because `local' isn't what most people think of as
               "local".  See the Private Variables via my() entry
               in the perlsub manpage for details.

               A local modifies the listed variables to be local
               to the enclosing block, file, or eval.  If more
               than one value is listed, the list must be placed
               in parentheses.  See the Temporary Values via
               local() entry in the perlsub manpage for details,
               including issues with tied arrays and hashes.