in reply to (Golf) Decorating the Christmas Tree
Ok. ' ' can be replaced by $" which defaults to a space (1 char). The parens around --$h are unnecessary (2 chars). $_==1?X:Y can be rewritten as $_-1?Y:X (1 char). "\n" can be replaced by $/ (2 chars). That results in a s(h)aving of 6 chars, bringing it from 94 to 88.print' 'x(--$h).($_==1?'*':join'',map{rand>$f?'=' :qw(* 0 @ +)[rand 4]}1..$_*2-1)."\n"for 1..$h
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: README: The Sand Wedge (Re: (Golf) Decorating the Christmas Tree)
by dragonchild (Archbishop) on Dec 04, 2001 at 01:41 UTC | |
|
Re: README: The Sand Wedge (Re: (Golf) Decorating the Christmas Tree)
by Rhose (Priest) on Dec 04, 2001 at 00:31 UTC |