title: Global Variable, subroutine variable Question in Perl
body: <p>How can I transfer the subroutine variable value into another subroutine variable, Can I use global variable.</p>
  
  <pre><code>sub foo(){
  
  my $myvar = "Hello";
  } 
  
  sub foo1(){
  my $myvar1 = $myvar;   # how can I get the "Hello" from $myvar.
  }
  </code></pre>
  
  <p>I tried to use package and global variable, but failed.</p>
  
  <pre><code>Package Bar;
  our $bar;
  </code></pre>
  
  <p>Thank you.</p>