note
choroba
The first line declares an alias $var for the global variable $var in the current package. The second line makes it an alias of the $var variable in the main package.<P>
Therefore, it only makes sense to use this in a package different to main. For example:
<c>
#!/usr/bin/perl
use warnings;
use strict;
our $var;
$var = 42;
{ package My;
our $var;
*var = \$main::var;
print $var, "\n";
$var = 84;
}
print $var, "\n";
</c><P>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-832495">
<c>map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]</c>
</div></div><!-- Wiki2Monks {"version":1.142} -->
11108262
11108262