in reply to Re: reset function (never)
in thread reset function
"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...
Cheers Rolf
( addicted to the Perl Programming Language)
Me thinks this must be a relict of one-liner hacking. Anything else is just to dangerous..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: reset function (never)
by boftx (Deacon) on Nov 21, 2013 at 02:47 UTC | |
by Anonymous Monk on Nov 21, 2013 at 03:33 UTC | |
by dave_the_m (Monsignor) on Nov 21, 2013 at 09:08 UTC |