Re: Perl vs. C?

[email protected] (Rick Klement)
Newsgroups perl.golf
Message-ID <[email protected]>
Ian Phillipps wrote:
> 
> The following was distributed a while ago as "footguy.c".
> Can any golfers duplicate its function in perl using fewer characters?
> 
> main(l){main(8^putchar(l++["xx77Rd$fR$wPP"]^88)?l:26+fflush(sleep(1))-l);}
> 

How about:

  perl -e's//_\b/;$_^=p while sleep print" oo\n<|>\n_|"x!$|++,$_'

and it fixes a bug in the C version where the last line of the footguy
isn't drawn until after the first sleep.

To be fair, the perl -e'' shouldn't count, so:

76: main(l){main(8^putchar(l++["xx77Rd$fR$wPP"]^88)?l:26+fflush(sleep(1)1);}

54: s//_\b/;$_^=p while sleep print" oo\n<|>\n_|"x!$|++,$_

Darn, only 22 strokes shorter  :(

-- 
Rick Klement
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.