in reply to obfuscation virgin
in thread My First JAPH - Be Gentle :-)

Only a couple of style notes. while($a ne "") is better written (in this case) as while($a).

The print join(" ", @a) is almost always (as least where you're being obscure) better written as print "@a".

Improvements?

This was a pretty good first attempt. I'll only make two suggestions.

The code in the while loop b(substr($a,0,2);$a=substr($a,2); can be tightened up a bit with b $a=~/(.{2})/;$a=$'. (Hope that pasted right). The same formula can be used in b(). Since b() isn't returning a value at all, adding a shift to the very end of it, and then in the while loop saying:

while($a) { $a=b $a=~/(.{2})(.*)/g; }

Tightens things up nicely.

This further shortens up to:

1 while($a=b $a=~/(.{2})(.*)/g);

Replies are listed 'Best First'.
Re: Re: My First JAPH - Be Gentle :-)
by iamcal (Friar) on Mar 20, 2001 at 20:29 UTC
    This seems to be a reply about my code but is attached to code be TStanley - is there some trickery involved with finding comments relating to a post?

    Anyway, thanks for the tips!