Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Barstool Trivia

by Dominus (Parson)
on Dec 15, 2000 at 08:08 UTC ( #46790=note: print w/ replies, xml ) Need Help??


in reply to Barstool Trivia

I would just have said "start a block". Otherwise you have to worry about whether a bare block counts as a loop.

Anyway, I'll toss one in: eval on a string starts a new scope. I can think of at least one other one, but I don't want to be a spoil sport so I'll let someone else jump in.

As for the baseball thing, I know that I knew this at one time, and I'm sure there are either seven or eight ways to reach base, but I'm not sure which, and I can only think of seven. So if anyone out there knows that it's eight, please let me know so that I can rack my brains for a while.


Comment on Re: Barstool Trivia
Re: Re: Barstool Trivia
by saucepan (Scribe) on Dec 15, 2000 at 09:11 UTC
    Were you thinking of creating a file boundary with do or require? Or does that not count? What about fork? :)

      Says saucepan:
      > Were you thinking of creating a file boundary with do or require?
      Yes, that's the only other one I could think of.

      Dan, what are we missing?

        Well, I warned you that it was an intentionally ambiguous question. My answers are from what the source considers different ways to start a scope, because I was playing around with that sort of stuff recently.

        So, so far we've got three correct answers. `eval STRING', a block, and a loop. Remember that `do' and `require' are really special cases of `eval STRING'. And yes, the source does distinguish between a loop and a block.

        There are four left which have yet to be named. I'll give you one more. This one is the last "easy" one, in that it's not completely surprising: `sub' starts a scope, and the source considers that different from a block.

        So there are three more out there. These ones, especially two of them, are completely obscure ways to start scopes.

        P.S. I too once knew the answer to the baseball question, but it's been too long. Base hit, walk, hit by pitch, dropped third strike, catcher's interference, fielder's choice, error. That's all I can think of, which is seven. My memory wants to say that a catcher's balk counts, but I think a catcher's balk has the same effect as a pitcher's balk. Hmm...

        -dlc

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2014-09-19 22:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (149 votes), past polls