But FWIW:
use strict; use warnings; my $var = 42; # lexical var our $van = 42; # package var { my $var = 10; local $van = 5; print "Var value =$var, Van value =$van\n"; } # Leaving block "resets" scoped variables print "Var value =$var, Van value =$van\n";
thats the Perl way to realize "resets".
But we normally just use different namespaces/scopes or just entries of a hash %v.
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re: reset function
by LanX
in thread reset function
by waytoperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |