http://www.perlmonks.org?node_id=680182


in reply to Re^2: Syntax error - "my" within foreach loop
in thread Syntax error - "my" within foreach loop

I've never used diagnostics with more sophistication than simply putting a "use diagnostics;" at the top of a script that's failing with a message that I don't understand.

Though, I probably should've tried it with the OP's code before submitting my comment here, as it doesn't seem to reveal anything pithy that's not already in the orginal error message.

In my defense, Klammer says he's a beginner, and it seemed like a good idea to recommend "use diagnostics;" in general, in case he was unaware of it.