Re: temp $var;

2004-12-03 Thread Larry Wall
On Sat, Dec 04, 2004 at 06:01:45AM +0300, Alexey Trofimenko wrote: : : my $var="foo"; : { : temp $var; : say $var; : } : : would it be undef or "foo"? It's undef if we follow Perl 5. (Early Perls actually kept the original value, but that was deemed impro

temp $var;

2004-12-03 Thread Alexey Trofimenko
my $var="foo"; { temp $var; say $var; } would it be undef or "foo"? if the former, how could I make $var to contain a copy of original content? using analogy with my $x = $x, that's not going to work.. temp $var = $OUTER::var? OTOH, my @a = ...