Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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:$"; $_=$s; s/(H+) */"|".length$1/ge; print"$s\n$_|\n$c\n"

Comment on Re: Re: Re: YAGG (Yet Another Golf Game)
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2016-02-06 08:04 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (219 votes), past polls