Once in a while I repeat saying something like
"Perl doesn't stop to surprise me!"
And I always hope the intervals between these moments will get bigger...
But now... oh man ... this reset builtin is really scary!
DB<132> @x=(4,2);$x=42; $y=0;
while ($y++<3) {
$x=$y;
print "$x -" ;
reset('x') if $y>1 ;
print " $x : @x\n";
}
1 - 1 : 4 2
2 - :
3 - :
IMHO it doesn't "reset" at all, it just deletes all variables of the glob *x without deleting the glob.
Only delete $main::{'x'} is more radical...
o_O WTF !?!
Cheers Rolf
( addicted to the Perl Programming Language)
update
Me thinks this must be a relict of one-liner hacking. Anything else is just to dangerous.. |