in reply to How do I get to this 'simple' helper?

i see that your question was answered. One additional pointer: use block eval rather than string eval. Instead of wrapping all that in double-quotes, you put it in a curlies block. It's easier to write and to read.

UPDATE: I stand corrected. Think-o

  • Comment on Re: How do I get to this 'simple' helper?

Replies are listed 'Best First'.
Re^2: How do I get to this 'simple' helper?
by ikegami (Patriarch) on Sep 03, 2010 at 06:17 UTC
    And totally useless. The OP is trying to generate code, not catch exceptions.
Re^2: How do I get to this 'simple' helper?
by Argel (Prior) on Sep 03, 2010 at 20:03 UTC
    For better or worse eval handles two very different roles:
    1. eval STRING is used to generate new code during run-time by evaluating the string during run-time.
    2. eval BLOCK is used for exception handling and is not not evaluated during run-time.
    No idea why something more obvious like "catch" was not used for eval blocks, but that oversight has certainly led to lots of confusion.

    Elda Taluta; Sarks Sark; Ark Arks