title: Error "panic: attempt to copy freed scalar" when using Getopt::Long
body: <p>I get the error: </p>
  
  <pre><code>panic: attempt to copy freed scalar a121fb4 to a156be8 at ./p.pl line 13.
  </code></pre>
  
  <p>when I run the following program (<code>p.pl</code>):</p>
  
  <pre><code>use warnings;
  use strict;
  use Getopt::Long qw(GetOptions);
  
  main(@ARGV);
  
  sub main {
    GetOptions ();
  
    print "\@ARGV=@ARGV\n";
    my $arg=shift;
  }
  </code></pre>
  
  <p>when using one or more command line arguments, for example <code>p.pl 1</code> gives the error.</p>
  
  <p>What is the reason for this?</p>