in reply to Re^4: Swapping two values
in thread Swapping two values
You're probably right. The post makes some sense in that context. It's true, of course, that you can't reliably swap a string's characters in place using the XOR method. You can, however, swap pointers that point into the same string in memory without any problems. In any case, the method does have merit as an optimization in C. But not Perl! :-)
-sauoq "My two cents aren't worth a dime.";
|
|---|