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

Re^2: Perl Example of Control Break Processing

by Jim (Curate)
on Sep 10, 2011 at 15:14 UTC ( [id://925258]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl Example of Control Break Processing
in thread Perl Example of Control Break Processing

[Y]our program includes no code specific to what you intended to demonstrate …, that is, except for offering the notion that if the illustration is there, you may want to highlight it in the code, and accompany that with explanatory narrative.

Good suggestion. Yes, Damian Conway would have highlighted the two control breaks in the example code and then elaborated on them in the text.

The two control breaks are the two if-then constructs. The first one occurs when the dealer has dealt the fifth card to the player to his right. The second one—the terminal one—occurs after the nth round of play.

I suppose one could argue there's a third control break in the program that occurs when the deck of cards is exhausted and reshuffled. It's implicit in the loop construct, so its implementation is different than the other two control breaks. But I realized after I wrote the script that poker isn't played this way. The deck is reassembled and shuffled after each hand.

  • Comment on Re^2: Perl Example of Control Break Processing

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-25 15:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found