http://www.perlmonks.org?node_id=46775

While sitting at a bar after a ballgame, conversation inevitably turns to sports trivia. Sports trivia is really based around stumping and confounding your buddies with obscure, cleverly put, ambiguous, and potentially misleading questions.

The classic "How many ways to get on base can you name?" is a great example.

"Single, double, triple..."

"No, no, no! Those are all just base hits. That counts as one."

"Oh. OK. Base hit, walk, hit by pitch, wild pitch, ..."

"Wild pitch?! You can't get on base with a wild pitch."

"You could if you swung at it and it was your third strike."

"Well, that's the dropped third strike rule. Nothing to do with wild pitches."

&c. You get the idea. Lately I've been trying to extend this game to Perl questions when hanging out with Perl buddies.

So here is my favorite question so far. I thought a few monks might be interested, and might also have some of their own.

How many distinct ways can you name to start a new scope?

Hint: a loop is a loop is a loop, and it just counts for one.

-dlc