title: Perl "Global symbol"
body: <p>In the following perl script,</p>
  
  <pre><code>#!/usr/local/bin/perl
  use Env;
  use strict;
  use warnings;
  my $oscar_file = "input/oscar_single_piminus_1k.input";
  my $PISAEvent_file  = "output/PISAEvent_piminus_1k.root";
  my %pisa_input = "pisa_piminus_1k.input" ;
  my %pisa_start = "pisa &lt; pisa_piminus_1k.input";
  my $nevents = 1000;
  open(INPUT, "&gt;" . $pisa_input);
  print INPUT "0\nN\n0\n";
  close(INPUT);
  open(INPUT2,"&gt;glogon.kmac");
  print INPUT2 "macro glogon.kumac\npisafile $PISAEvent_file\ntext_file $oscar_file -1 1\nptrig $nevents\nexit\nreturn\n";
  close(INPUT2);
  my $ret = system($pisa_start);
  </code></pre>
  
  <p>It returns the following error,</p>
  
  <pre><code>Global symbol "$pisa_input" requires explicit package name at pisa.pl line 26.
  Global symbol "$pisa_start" requires explicit package name at pisa.pl line 32.
  Execution of pisa.pl aborted due to compilation errors.
  </code></pre>
  
  <p>Commenting out "use strict" does not help,</p>
  
  <pre><code>Name "main::pisa_input" used only once: possible typo at pisa.pl line 26.
  Name "main::pisa_start" used only once: possible typo at pisa.pl line 32.
  Odd number of elements in hash assignment at pisa.pl line 15.
  Odd number of elements in hash assignment at pisa.pl line 20.
  Use of uninitialized value in concatenation (.) or string at pisa.pl line 26.
  print() on closed filehandle INPUT at pisa.pl line 27.
  Use of uninitialized value in system at pisa.pl line 32.
  </code></pre>
  
  <p>What is going on?</p>