in reply to Re: How to use __DATA__ efficiently, help!
in thread How to use __DATA__ efficiently, help!

it is not an error message

He made an error (concatenated two variable without giving either a value) and Perl issued a message in response to that error. How is that message not an error message? It's simply not an (immediately) fatal error.

is probably because you have empty lines in your __DATA__ area.

No, he gets the warning before even executing <DATA> because he's using a bottom tested loop.

Replies are listed 'Best First'.
Re^3: How to use __DATA__ efficiently, help!
by CountZero (Bishop) on Feb 10, 2011 at 06:23 UTC
    He made an error (concatenated two variable without giving either a value) and Perl issued a message in response to that error.

    Then we have different definitions of error and warning.

    The OP concatenated nothing to nothing (and thus wastes a cycle of that loop) but his output is still correct. In my book that is not an error, but it does warrant a warning as it can be written better.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      The output isn't correct. $data does not contains what it should at all.