in reply to Obfuscation: Text munging techniques

This is a nice piece of obfuscation.

One way I would go about 'improving' it (err.. obfuscating it further) is remove the warnings (-w) option and 'strict' pragma. This will allow you to do a number of illegal moves and get away with it relatively clean. One thing I'll do is remove all occurances of the 'my ' declarations, they will no longer be needed. You could also look at replacing lengthy and rather descriptive variable names with something less readable.

Update: I'm not sure if this change would be most applicable if you were to write a japh, but you could also replace this:
$magritte = pack q\C4\, split /,/, qq; 80, 101, 114, 108; ;
with just:
$magritte = "\u$^X";
Initially, the former line looked to me quite obvious. However, as I look at it now.. the updated line doesn't seam as puzzling either. ;/ Oh, well, as I said, it might be good for a japh.

_____________________
# Under Construction

Replies are listed 'Best First'.
Re: Re: Obfuscation: Text munging techniques
by theorbtwo (Prior) on Aug 11, 2002 at 22:11 UTC

    OTOH, writing under warnings/strict is somwhat harder. It keeps you from using some tricks, and makes you either "my" your vars, or use vars that are exempt, which mostly means magic vars from perlvar... which, in turn, sometimes clues you in on "interesting" uses of them, such as relying on obscure defaults for things like $;, or using $, instead of join.


    Confession: It does an Immortal Body good.