C:\>perl -e "use diagnostics; print if (m/foo/i) while(<>)" syntax error at -e line 1, near ") while" Execution of -e aborted due to compilation errors (#1) Uncaught exception from user code: syntax error at -e line 1, near ") while" Execution of -e aborted due to compilation errors.