in reply to Syntax error with nested for loop
For future reference in similar cases, converting the one-liner to one statement per line in a conventional script will aid debugging. Using scoped variables with use strict; use warnings; will help even more.
Update: BTW, I rarely use one-liners. In my typical workflow over the years, any experimental code I try I figure I will reuse so I put it in an executable program from the beginning. My guess is that Windows Perl users may use one-liners more because, IMHO, it may be easier than starting a one-off script in that environment.
|
|---|