in reply to Re: (Golf) Decorating the Christmas Tree
in thread (Golf) Decorating the Christmas Tree

of course i just realized i could legally cut my chars down to 105 (94 excluding the setting of $h and $f) with:
($h,$f)=@_;print' 'x(--$h).($_==1?'*':join'',map{rand>$f?'=':qw(* 0 @ ++)[rand 4]}1..$_*2-1)."\n"for 1..$h
- danboo

Replies are listed 'Best First'.
Re: Re: Re: (Golf) Decorating the Christmas Tree
by japhy (Canon) on Dec 03, 2001 at 23:35 UTC
    And I can trim it to 88 (if we leave out the assignment):
    print$"x--$h.($_-1?join'',map{rand>$f?'=':qw (* 0 @ +)[rand 4]}1..$_*2-1:'*').$/for 1..$h

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

      print$"x--$h.($_<2?'*':join'',map{rand>$f?'=':qw(* 0 @ +)[rand 4]}2..$ +_*2).$/for 1..$h