Don't ask to ask, just ask | |
PerlMonks |
Re: updated version of old sigby benizi (Hermit) |
on Oct 24, 2003 at 20:53 UTC ( [id://301963]=note: print w/replies, xml ) | Need Help?? |
I know it's really minor, but every stroke counts: You have several ternary ops using '==' (e.g. $_==16?$p:$_&=15). Since the variables're all integers, you can accomplish the same thing using '-' and reversing the order of the options. (e.g. $_-16?$_:$p&=15). In general X==Y?A:B is equivalent to X-Y?B:A. (Note that, in the more complicated (multiple-)ternaries, you'll have to do a bit more shuffling.)
In Section
Obfuscated Code
|
|