[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



On Thu, 10 Jun 1999, Michael G Schwern wrote:
> On Thu, Jun 10, 1999 at 10:16:45PM -0500, Tushar Samant wrote:
> > 
> >     $q^=$p^=$q^=$p
> > 
> > (probably well-known; if not, try it)
> 
> ($p,$q) = ($q,$p);

That's highly obfuscated. Are you sure you want it in maintainable code?

--
Tushar Samant
~
~
:wq


==== 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