P
paul_0403
I have a perl program that opens and writes to a logfile, this all
works
well.
ie
if (! open (LOG, ">>$logfile"))
{
print STDERR "Cannot open logfile $logfile $!\n";
exit 1;
}
print LOG "Hello world\n"
I want to redirect the outpuf of a system command ot the same
log but I am having trouble getting it to work.
Can I do something like this? If not, how can I get this to work.
system("kill -USR1 \"$1\" > LOG 2>\&1");
When I issue this command on the command line I get a permissions
problem. When I run it from the perl script I was expecting to see the
same permssion problem in my log file.
THanks to all who answer
works
well.
ie
if (! open (LOG, ">>$logfile"))
{
print STDERR "Cannot open logfile $logfile $!\n";
exit 1;
}
print LOG "Hello world\n"
I want to redirect the outpuf of a system command ot the same
log but I am having trouble getting it to work.
Can I do something like this? If not, how can I get this to work.
system("kill -USR1 \"$1\" > LOG 2>\&1");
When I issue this command on the command line I get a permissions
problem. When I run it from the perl script I was expecting to see the
same permssion problem in my log file.
THanks to all who answer