Sayed, Irfan (Irfan) wrote:
Hi All,
I did as follows but still not getting output in a file.
plz help
#########/usr/atria/bin/Perl -w
use strict;
use warnings;
my $CT = "/usr/atria/bin/cleartool";
my @vob_list = `$CT lsvob -s`;
my $fname = "/tmp/vob_trigger";
open FILE,">>",$fname or die $!;
foreach (@vob_list)
{
print "Following are the triggers applied for $_ VOB\n\n";
my $cmd = "$CT lstype -kind trtype -invob $_";
my $out = qx`$cmd`;
print FILE $out;
print "***********************************************\n\n";
}
regards
irfan.
Hello Irfan,
Here is a sample program,which writes the command output to a file.
$fname="output.txt";
open(FILE,">>$fname");
my $cmd = "ls";
my $out = qx/$cmd/;
print FILE $out;
close(FILE);
--
Prabu.M.A
When I was born I was so surprised
I didnt talk for a period and half
-Gracie Allen
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>