[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [Fun With Perl] How to swap $p and $q without $tmp



Reply-to: bjm@paralynx.com
>From vlb@cfcl.com  Thu Jun 10 21:04:42 1999 - apologies for the delay - vlb]
  Date: Thu, 10 Jun 1999 20:55:47 -0700 (PDT)
  Message-Id: <199906110355.UAA19975@a2b01118.paralynx.bconnected.net>
  X-Authentication-Warning: a2b01118.paralynx.bconnected.net: bjm set 
sender to  bjm@a2b01118.paralynx.bconnected.net using -f
  In-reply-to: <Pine.LNX.3.96.990610221048.31468B-100000@zeppo.i-2.com> (message
	from Tushar Samant on Thu, 10 Jun 1999 22:16:45 -0500 (CDT))
  References:  <Pine.LNX.3.96.990610221048.31468B-100000@zeppo.i-2.com>

>>>>> "Tushar" == Tushar Samant <tushar@i-works.com> writes:

     Tushar>     $q^=$p^=$q^=$p

Or the more idiomatic:

   ($p,$q) = ($q,$p)

-- 
Brad Murray  "Anyway, you can tell that CreateProcess is simply wrong,
Perl Geek     not just because it's too complicated yet too limited, but
               because its name is long and ugly."   Tom Christiansen

==== Want to unsubscribe from this list? (Don't you love us anymore?)
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org

</x-flowed>