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

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

  • Comment on Re^3: How to use __DATA__ efficiently, help!

Replies are listed 'Best First'.
Re^4: How to use __DATA__ efficiently, help!
by ikegami (Patriarch) on Feb 10, 2011 at 07:22 UTC
    The output isn't correct. $data does not contains what it should at all.