in reply to eval, Read environment variable and expand using eval

while ($stmt = <DATA>) { eval $stmt; ... }

Yikes!

Surely, the two most important rules of using  eval on data are:

Per rovf's reply, isn't there another way to parse your config file, or to structure your config file so it may be more easily parsed?

Update: Changed some emphases.

Replies are listed 'Best First'.
Re^2: eval, Read environment variable and expand using eval
by Anonymous Monk on Feb 19, 2010 at 13:48 UTC

    Is the data produced by your source code editor, or that of your collegues, to be absolutely trusted?

    How about the data you download from CPAN and process with your perl executable?

      Lame strawman, put it in module, write tests, verify ...

        Lame attempt at poisoning the well.

        Have you ever verified every line of your collegues code or CPAN module before running it?

        By the time you've finished running their tests, the damage is already done.