Thanks but I need STD output and STD error in the same file. How should I do that.
Regards Irfan. -----Original Message----- From: Nitin Kalra [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2008 10:03 PM To: Sayed, Irfan (Cognizant); beginners@perl.org Subject: Re: help in redirecting output to file Why don't u use this code :- open NEW_OUT,">output.txt"; select NEW_OUT; # making output.txt to take the default STD output.... Hope this helps... BR/Nitin --- [EMAIL PROTECTED] wrote: > > Hi All, > > > > Can somebody please help me for this block of code. > > > > if ("$1" ne "-log"){ > > `$0 -log "$@" 2>&1 | tee the_log_file.$$.log`; > > exit 0; > > } > > > > I know this code redirects the output of entire perl > script to file but > it is not executing as expected. > > > > Can somebody please explain / help > > > > Regards > > Irfan. > > > > > > This e-mail and any files transmitted with it are > for the sole use of the intended recipient(s) and > may contain confidential and privileged information. > If you are not the intended recipient, please > contact the sender by reply e-mail and destroy all > copies of the original message. > Any unauthorised review, use, disclosure, > dissemination, forwarding, printing or copying of > this email or any action taken in reliance on this > e-mail is strictly > prohibited and may be unlawful. Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/ This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.