tshabet has asked for the
wisdom of the Perl Monks concerning the following question:

OK, this seems like a problem that someone else must have run into before, so I'm looking for advice from the fantastic Monks.
I'm running a script that uses Text::Balanced to parse blocks of code with balanced braces. The script itself runs great, but since not everyone using this script will be as careful as I am (heh heh) I'm building in some error handling and diagnosis etc. One feature that I have is sort of combo looking cool/actually helpful. Basically, the pertinent piece of code looks like this:

OK, fair enough. The code works nicely, spits out a little counter number and displays the code block currently being processed. So I found this pretty handy if/when a piece of sample input went into an infinite loop or something, I could actually see it not changing. Now what I'd like to offer other users of this code is the ability to stop/start the code while in the loop above, so that they could actually stop the output, look at the half processed block, then start it again. I figure this would be handy for folks trying to understand the way the tool works, plus handy for people trying to debug a problem with the way my code and their input interact. So how to best implement this?
I've looked at the sleep() function, which could be cool. Should I just put a sleep(10) in an if(the foo key is struck) type of statement within the while loop? If this isn't practical or possible without big problems for the code, no biggy. I'm just wondering if anyone has already dealt with this problem in their own work and found a neat solution. Thanks Monks!

Personally I hate doing that, cos you hit ctrl+s to freeze the screen, then when you hit ctrl+q again your window gets flooded with stuff if there's more than one page meaning you miss all the other data.

That's why I prefer ctrl-Z, as it actually stops the running
of the program and gives back the command prompt. Since you
get the command prompt back, it seems like a better solution
anyway; the user can look at the output files and then deside
to "fg" the program to let it continue.

Have you ever had one of those days when you should have stayed in bed? Here I am, a guy using Unix variants just about every day for the last, oh, 6 years......and I kid you not, using ctrl-s and ctrl-q NEVER occured to me. Boy....
Yes, this is to be run on a unix box, so that solution works perfectly <slaps forehead>
Sorry to waste your time guys, I feel pretty dumb right now. I should probably take a nap. My apologies for my oversight :-(

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other