in reply to cvs control/perl -c


Your problem is that the output from perl -c is going to STDERR. Try this if your shell supports this type of redirection:
my $rc = `$^X -c $_ 2>&1`; chomp $rc; unless ($rc eq "$_ syntax OK") { print "$rc"; $errors++; }
This is explained in qx/STRING/ in perlop.

Otherwise you could examine the value of $? after using the backticks, see perlvar:

my $rc = `$^X -c $_`; if ($?) { print "$rc"; $errors++; }
--
John.