in reply to Mode of created files
To *get* the permissions of a file, I assume you'd want to use stat, yes, or File::stat, which gives a nice by-name interface to the stat fields. So, for example,
I'm not quite sure how you'd go about turning file permissions into a file creation mask (as used by umask), other than a big if/then block.use File::stat; my $st = stat "foo"; print "file is executable" if $st->mode & 0111;
|
|---|