in reply to obfuscation virgin
in thread My First JAPH - Be Gentle :-)
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 |