If you're interested in success/failure only, you could run system LIST and check the exit code. That would fix the quoting issue of -e:
system $^X, '-wce', $code and warn "syntax check failed\n";
In reply to Re^3: How to do a "perl -c(w)" check instead of an "eval $string" on a code string
by shmem
in thread How to do a "perl -c(w)" check instead of an "eval $string" on a code string
by Your Mother
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |