in reply to Re: How to do a "perl -c(w)" check instead of an "eval $string" on a code string
in thread How to do a "perl -c(w)" check instead of an "eval $string" on a code string

Also nice and good tips. I don't know why I didn't consider tempfiles already. I use them all the time and I've got a uuid already so it can go in the app's files. Sigh.

  • Comment on Re^2: How to do a "perl -c(w)" check instead of an "eval $string" on a code string

Replies are listed 'Best First'.
Re^3: How to do a "perl -c(w)" check instead of an "eval $string" on a code string
by shmem (Chancellor) on Jan 20, 2009 at 01:12 UTC

    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";