Swapping the values of the references does not waste memory, but it violates rule n.2, namely that I want $a to be a string, not a reference to a string.
In reply to Re: Re: How to swap scalar values without copies
by Anonymous Monk
in thread How to swap scalar values without copies
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |