in reply to Re: Re: Exchanging Variables
in thread Exchanging Variables

re: Is there any other ways of doing this that might be used for other tasks? Or is this the only *reasonable* way to do it?

You might want to ask that in the Obfuscation section and then stand back.

how about:

push @INC, $first, $second; # not a temporary since it already exists! $_= pop @INC foreach ($first, $second);

Replies are listed 'Best First'.
Re: Re: Re: Re: Exchanging Variables
by mischief (Hermit) on Aug 10, 2001 at 13:21 UTC

    or, uhm...

    $x = substr($x.$y, -(length($y) * ($y =~ s/^$y$/$x/)), length($y));

    update: substr, not suystr. sorry. Thanks John.