in reply to cvs control/perl -c

It might be that you have something other than the value of $/ at the end of the line - what OS are you running this on ? You could determine what is on the end of the line by redirecting the output to a file and examining it with od or its moral equivalent.

Of course it is only the 'Syntax OK' message that is going to STDOUT - as jmcnamara points out any error messages will go to STDERR so you should arrange for that to be redirected

You also might want to consider examining $? rather than comparing the output string so your test would become :

if ( $? ) { print $rc; $errors++; }

/J\

Replies are listed 'Best First'.
Re: Re: cvs control/perl -c
by doorslam (Beadle) on Feb 04, 2002 at 13:32 UTC
    running on Linux with perl v5.6.0...

    Thanks for the help, it's working properly now. I'm using the "if ( $? )" method so that the OK message is still dropped to stdout just for some feedback to the user.

    B.
    Catapulta habeo. Nisi pecuniam omnem mihi dedis, ad caput tuum saxum immane mittam.
      Small quibble: all output from perl -c goes to STDERR, whether it's "syntax OK" or error messages.