Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
No such thing as a small change
 
PerlMonks  

Re: capture output of perl -c scriptname

by Anonymous Monk
on Jun 29, 2012 at 10:26 UTC ( #979091=note: print w/ replies, xml ) Need Help??


in reply to capture output of perl -c scriptname

Why is the output always going to stdout?

Because it must not be going to STDOUT ( backticks capture STDOUT ), it must be going to STDERR (backticks don't capture STDERR )

Observe (I'm also on windows )

$ perl -le " print 111, `perl -e print(666)` " 111666 $ perl -le " print 111, `perl -e warn(666)` " 666 at -e line 1. 111

You want to use glob "C:/*.sys"

glob "C:/*WINDOW*/*.ini"

or File::Find::Rule, Re^2: code for serching .txt file through directories and sub directories, Re: list of files in subdirectories

or use Test::Compile - Check whether Perl module files compile correctly

What is is that you're really trying to do?


Comment on Re: capture output of perl -c scriptname
Download Code
Re^2: capture output of perl -c scriptname
by cztmonk (Monk) on Jun 29, 2012 at 10:31 UTC

    I want to Check whether Perl scripts compile correctly. Thanks for the link to Test::Compile

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://979091]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2013-05-26 06:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (524 votes), past polls