in reply to Re: Undocumented Operator Japh
in thread Undocumented Operator Japh

Nicely done, chargrill, as always++

One of the fun parts of creating the obfuscation was writing the subroutine to "decrement" a word (eg. "Jus"-- => "Jur").

It wasn't clear initially clear how many "increments" I was going to want to make, and if it turned out to be more than a few (as it certainly did), I needed to a subroutine to do it.

This was what I ended up with:

sub decrement_word { my ($pword) = @_; my @vals = map { ord $_ } (split //, $$pword); my $idx = $#vals; while (1) { if ($vals[$idx] != ord('a') and $vals[$idx] != ord('A')) { --$vals[$idx]; last; } if (0 == $idx) { shift @vals; last; } $vals[$idx] += 25; --$idx; } my $word = join '', map { chr } @vals; $$pword = $word; }

It's too bad, I think, that a word "decrement" isn't part of the Perl language, at least for the obfuscatory potential it would provide. ;-)


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/