Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Potentially useful code fragment for you JAPHer's

by spaz (Pilgrim)
on Mar 20, 2001 at 08:58 UTC ( [id://65627]=note: print w/replies, xml ) Need Help??


in reply to Potentially useful code fragment for you JAPHer's

And for those of you wondering what the easiest other way is
($x, $y) = ($y, $x);
-- Dave

Replies are listed 'Best First'.
Re: Re: Potentially useful code fragment for you JAPHer's
by japhy (Canon) on Mar 20, 2001 at 20:46 UTC
    But the one jcwren posted can be easily abused:
    $==1,$^^=2,$^^^=$=^=$^^^=$=; $==1,$^^=2,$=^=$^^^=$=^=$^^;
    The traditional method (the swap you show) is only easily obfuscated by something like
    # if you're allowed to over-write $( and $) ($),$() = ($(,$));
    Kudos to the person who explains my XOR obfuscation.

    japhy -- Perl and Regex Hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://65627]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found