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:Bryan_R_Harris@RAYTHEON.COM] > 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: beginners-unsubscribe@perl.org > For additional commands, e-mail: beginners-help@perl.org > >Thread Previous | Thread Next