John W. Krahn wrote:
my ( $x, $y ) = ( "two", "three" );
print "\$x = $x \$y = $y";
$x ^= $y;
$y ^= $x;
$x ^= $y;
print "\$x = $x \$y = $y";
Cool. I wouldn't have thought such a xoring would work on strings with
different length. Well, maybe I would, but I certainly haven't. Very
cool, indee
Ryan10975073 wrote:
>
> hi,
Hello,
> The statement ($a,$b) = ($b ,$a); is swapping without a third variable.
> But looking at a lower level , it is storing a temporary variable in the
> registers.
Not necessarily. :-)
$ perl -le'
my ( $x, $y ) = ( 5, 16 );
print "\$x = $x \$y = $y";
$x ^=
Ryan10975073 wrote:
>
> The statement ($a,$b) = ($b ,$a); is swapping without a third variable.
> But looking at a lower level , it is storing a temporary variable in the
> registers.
No it's not. It's building a temporary list of two values.
> How can i get that temporary variable/value from t