in reply to Re^2: perl - bash script problem
in thread perl - bash script problem

Now that you have it working, I wonder why you bother writing a bash script file to be executed in a separate system call, rather than just doing the "cvs" command itself via a perl system call. Seems like your script could just be:
chdir $wrPath; my $failed = system( "cvs diff >> $reportsPath/diffReport.txt" ); if ( $failed ) { warn "cvs diff returned non-zero exit status $failed\n"; }
If the rest of the script does stuff that depends crucially on what your current working directory is (before and/or after running "cvs diff"), you just need to add:
use Cwd; my $origpath = getcwd; # before doing 'chdir $wrPath' ... chdir $origpath; # after doing 'system( "cvs diff ..." )'