Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: (Golf) Decorating the Christmas Tree

by osfameron (Hermit)
on Dec 03, 2001 at 22:11 UTC ( [id://129131]=note: print w/replies, xml ) Need Help??


in reply to (Golf) Decorating the Christmas Tree

My first golf also, and not warnings safe. Followed some of belg4mit's conventions. 174 chars.
($h,$f,@F)=(5,.3,qw'@ + O %');sub x{printf"%+${h}s\n",$_[0]};x('*'); sub f{my$x;for(1..$_[0]){$x.=(rand()<$f)?$F[rand$#F+1]:'='}$x} for(1..($h-1)){$h++;x(f(1+(($_)*2)));}
Cheerio!
Osfameron

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found