Hey guys !
Thanks for the support .the following is the code I have written.
Working fine.

===========================
open(LOG,">$main::TRACELOGFILE") or die "Can't open trace file
$main::TRACELOGFILE";
     system("chown XXX:YYYYY  $main::TRACELOGFILE");
     system("chmod 0666 $main::TRACELOGFILE");
============================

Arjun


-----Original Message-----
From: John W. Krahn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 6:16 PM
To: Perl Beginners
Subject: Re: how to open a file with 666 permission


Bob Showalter wrote:
> [EMAIL PROTECTED] wrote:
>
>>My requirement is to open file with 666 permissions.
>
> You need to set umask to 0 before creating the file.
>
> But don't do that. It's inadvisable to mess with the umask in a
> program, IMO. If the user wants to create files as 666, let him set
> the umask before running your program.

Or use chmod() on the file to set whatever permissions you desire.


John
--
use Perl;
program
fulfillment

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




Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

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


Reply via email to