Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Re: YAGG (Yet Another Golf Game)

by chipmunk (Parson)
on Feb 13, 2002 at 06:27 UTC ( #145092=note: print w/replies, xml ) Need Help??


in reply to Re: Re: YAGG (Yet Another Golf Game)
in thread YAGG (Yet Another Golf Game)

This introduces a different error: if the last coin flip is a head, it doesn't get substituted, because it's not followed by a space. So, change the + to a *:
#!/usr/bin/perl $s.=rand()<.5?H:$"for+a..gr; $_=$s; s/(H+) */"|".length$1/ge; print"$s\n$_|\n$c\n"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://145092]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2017-06-23 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (536 votes). Check out past polls.