in reply to Re: How to swap scalar values without copies
in thread How to swap scalar values without copies
print "stage 0\n"; sleep 5; # memory usage now: 1800 Kb $a='a' x 10000000; $b='b'; print "stage 1\n"; sleep 5; # memory usage now: 21336 Kb ($a,$b)=($b,$a); print "stage 2\n"; sleep 5; # memory usage now: 31104 Kb
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: How to swap scalar values without copies
by Roger (Parson) on Feb 20, 2004 at 00:24 UTC | |
by Anonymous Monk on Feb 20, 2004 at 00:43 UTC |