Everything you always wanted to know about Obfuscation and Golfing, some strange techniques and odd operators many are not aware of.
Also, everything you *never* wished to know about Obfuscation and Golfing, some even stranger techniques and even odder operators many wished they were *not* aware of.
Video available at http://conferences.yapcasia.org/ya2008/talk/1007.
31. WYSINWYG
print quot;No underscores!quot; if 1_234_567_890 !~ /_/;
print quot;No e!quot; if 1e6 !~ /e/;
print quot;There is an e!quot; if 6666666666666666 =~ /e/;
print quot;There is a plus!quot; if 1e15 =~ /+/;
print quot;No dot!quot; if 0.00 !~ /./;
31
70. JAPH
(+$,=+$quot;).#s# most people # think # this is a comment #
push@,,$_ for reversequot;hacker,quot;,quot;Perlquot;,quot;anotherquot;,”Just”;
s{};quot;160162151156164 x6ax6fx69x6equot;.’$,,@,’;eee
70
98. Learn the special variables
#!/usr/bin/perl
@_=qw/Just another Perl hacker,/;
print join” “,@_
#!/usr/bin/perl
@_=qw/Just another Perl hacker,”;
print”@_”
98
129. Min Max
What does this do?
[ $x => $y ]->[ $y <= $x ]
...that’s the lesser of $x and $y
129
130. Min Max
What does this do?
[ $x => $y ]->[ $y <= $x ]
...that’s the lesser of $x and $y
[ $x => $y ]->[ $x <= $y ]
...and that’s the greater of $x and $y
130