Consider sysopen(); saves you the stat();
Use exiting file create if required sysopen(FH, $path, O_WRONLY | O_TRUNC | O_CREAT); If you're really sure it exists sysopen(FH, $path, O_WRONLY | O_TRUNC); > -----Original Message----- > From: Bryan R Harris [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 01, 2002 1:26 PM > To: Beginners > Subject: get file permissions? > > > > Is it possible to do the reverse of a chmod? To get the > permissions of a > given file as a number? > > I'm creating a new file from an old one, and I'd like the new > one to have > the same permissions as the old one. Is this possible? > > TIA. > > - B > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]