M
maheshpop1
Hi folks,
I have this following code snippet, where I am looking to get some
output from the CVS repository by running cvs log command at the bash
shell. The puzzling thing is that when I put this code snippet in a
seperate file called test.pl and run it. It runs fine and I can see the
output of cvs log. But when I run this as part of a complete program,
it fails at the @data = `$cmd 2>&-`; area.
I am trying to print the @data and all I get is this output
----LOG OUTPUT ----
cvsroot = /Repository/trunk cvsbase = /testCVS/junit g_isCli =
printing in Proble.pl program argv : -log
global command is LOG command = cvs log
Command is cvs log
11
(The above 11 is the output of the @data that I get from the shell
back).
Here is the code snippet
chdir('/testCVS/junit') or die "can't change dir" ;
my $cmd = 'cvs log';
print "Command is $cmd";
@data = `$cmd 2>&- `;
print LOG @data;
any help is appreciated.
regards,
Mahesh
I have this following code snippet, where I am looking to get some
output from the CVS repository by running cvs log command at the bash
shell. The puzzling thing is that when I put this code snippet in a
seperate file called test.pl and run it. It runs fine and I can see the
output of cvs log. But when I run this as part of a complete program,
it fails at the @data = `$cmd 2>&-`; area.
I am trying to print the @data and all I get is this output
----LOG OUTPUT ----
cvsroot = /Repository/trunk cvsbase = /testCVS/junit g_isCli =
printing in Proble.pl program argv : -log
global command is LOG command = cvs log
Command is cvs log
11
(The above 11 is the output of the @data that I get from the shell
back).
Here is the code snippet
chdir('/testCVS/junit') or die "can't change dir" ;
my $cmd = 'cvs log';
print "Command is $cmd";
@data = `$cmd 2>&- `;
print LOG @data;
any help is appreciated.
regards,
Mahesh