Thanks for your help ...
Actually,  I am running these on WNT.
The scripts work fine on unix (after putting in the #!/usr/local/bin/perl -w
line).
But do not work correctly on WNT.

b.pl is working fine.
If I do not use a log file,  then the output as shown on the screen is ok.
It is only when I use a log file that the output of b.pl is "lost".

I could find a workaround :
If I call b.pl using system("perl b.pl") then things work fine.

But I do not know why I have to invoke b.pl with perl ....


> -----Original Message-----
> From: Bob Showalter [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, October 25, 2001 9:50 PM
> To:   'Gupta, Ashish'; '[EMAIL PROTECTED]'
> Subject:      RE: system() and STDOUT & STDERR
> 
> 
> Are you sure b.pl is running correctly? You aren't checking the return
> value
> of system().
> 
> Your scripts as posted do not have the #!/usr/bin/perl line, so
> system("b.pl") 
> will be passed to the unix shell and not to perl.
> 
> Your example works fine for me, as long as I put the #!/usr/bin/perl lines
> at the top. I get the following output in the log file:
> 
> a.pl :: Starting ...
> CommandLine : -logfile test
> calling b.pl ...
> 
> ./b.pl :: Starting ...
> CommandLine :
> ./b.pl :: Finished ...
> a.pl :: Finished ...
> 
> 
*********************************************************************** 
This communication is confidential and is intended only for the person 
to whom it is addressed.  If you are not that person, you are not 
permitted to make use of the information and you are requested to 
notify administrator [EMAIL PROTECTED] immediately that 
you have received it and then destroy/erase the copy/e-mail in your 
possession. 
*********************************************************************** 



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to