in reply to Anothe JAPH entry

The 2 on the third line should not have a space after it. =) Nasty with all those evals.

You sould shorten it a bit with $_= at the beginning, and then change @i=split(/\s/,$d); to split/\s/; with the intrinsic split to @_ handy and it ups the line noise factor. Also, change foreach$h(@i) to just for(@_) and change all the references from $h to $_ which again ups the ugly.

Also, you can test for integer-ness on division with if(!($_%$n)) rather than if($_/$n==int($_/$n)) Beyond that you can change $m=$m+$_ into $m+=$_

All of that got it to 612 chars. I beat it down to about 473 chars but actually made it MORE readable in the process. =P Oh well. Good one, BTW. I had fun figuring it all out. Hopefully the tips above will make you even more dangerous in the future.

--
$you = new YOU;
honk() if $you->love(perl)

Replies are listed 'Best First'.
Re: Re: Anothe JAPH entry
by Redaba (Acolyte) on Nov 19, 2000 at 09:59 UTC
    Thank you very much for responding. I submitted an updated one before I read you're article, and was able to get it down to 460 (Using substitutions, single char splitting, and a few more ? instead of ifs)