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/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to