|There's more than one way to do things|
Re^3: How to do perl -c inside perl? (quoting)by BrowserUk (Pope)
|on Aug 28, 2012 at 18:49 UTC||Need Help??|
Now pass an arbitrary chunk of Perl code to "perl -e" in a portable manner.
I was only demonstrating that windows supported backticks, not championing the idea of using them and -e as a useful mechanism.
Capture both STDOUT and STDERR from it. Not so trivial.
Capturing stderr also is trivial:
But I would have thought feeding the code to a piped-open and checking the exit code would suffice if all that is required is a yay or nay.
And if you need to actually capture the error messages produced, then this might do the trick:
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.