in reply to Re^6: Ways to control a map() operation
in thread Ways to control a map() operation

You're playing on words now. The original point is you cannot leave an eval with last.

You are right that words are our problem. My original point was that you can leave eval with last. My perception of "leave" is that you stop executing the commands in eval{}. Your perception of leave appears to be to jump right to the end of the eval{} block.

It's like this: If you step out of your front door, you leave the house. But if you teleport to your friend's, you leave your house, too, don't you.

In fact, you can "leave" eval{} using die, too.

  • Comment on Re^7: Ways to control a map() operation

Replies are listed 'Best First'.
Re^8: Ways to control a map() operation
by Leviathan (Scribe) on Jul 16, 2006 at 16:12 UTC
    My perception of "leave" is that you stop executing the commands in eval{}

    You can do that, but as a side effect you also get to leave any surrounding block.

    In fact, you can "leave" eval{} using die, too.

    But that doesn't make you leave the surrounding "script" :) So it's saner to leave eval with a die rather than a last.

    --
    Leviathan.