Re: Temp variable

2003-08-25 Thread zsdc
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

Re: Temp variable

2003-08-23 Thread John W. Krahn
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 ^=

Re: Temp variable

2003-08-23 Thread Rob Dixon
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