Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Golfing dubstep.pl

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


in reply to Golfing dubstep.pl

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 dubstep.pl
by choroba (Bishop) 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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1052025]
help
Chatterbox?
[LanX]: the real problem: Britain ignores social mobility at its peril
[LanX]: oops sorry, should be msg

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2017-12-13 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (368 votes). Check out past polls.

    Notices?