Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: (Golf) Decorating the Christmas Tree

by danboo (Beadle)
on Dec 03, 2001 at 23:11 UTC ( [id://129149]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://129149]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-26 08:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found