Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Golfing

by hdb (Prior)
on Sep 03, 2013 at 06:36 UTC ( #1052025=note: print w/replies, xml ) Need Help??

in reply to Golfing

58 (credit to all entries above!). I hope I got the probability correct...

1 2 3 4 5 6 123456789012345678901234567890123456789012345678901234567890 perl -e'select$u,$u,$u,.1while$|=print+rand>5/9?"wub ":"wooo "'

Update: If you are happy to accept hyphens rather than blanks, we can save for more characters, see Re: Why is this auto-quoted?

1 2 3 4 5 6 123456789012345678901234567890123456789012345678901234567890 perl -e'select$u,$u,$u,.1while$|=print+rand>5/9?-wub:-wooo'

Replies are listed 'Best First'.
Re^2: Golfing
by choroba (Chancellor) on Sep 03, 2013 at 14:22 UTC
    Nice. Shortened to 55:
    1 2 3 4 5 1234567890123456789012345678901234567890123456789012345 perl -e'select$u,$u,$u,.1while$|=print rand>5/9?wub:wooo,$"'
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      Phantastic! I never see all the potential of the special variables. If one is allowed to first print a blank, one can shorten it by another character...

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2016-10-25 20:07 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (329 votes). Check out past polls.