in reply to RE: Re: Mode of created files
in thread Mode of created files
But I think you could use umask, still... and it may make it easier. Try something like this:my $mode = (stat "foo")[2];
I'm not sure if this is absolutely right (please someone correct me if it isn't), but it seemed to work for the test cases I tried.my $mode = (stat "foo")[2]; my $mask = 777 - join '', (($mode&0700)>>6, ($mode&0070)>>3, ($mode&0007)); umask oct $mask;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: Re: Mode of created files
by setantae (Scribe) on Mar 28, 2000 at 03:17 UTC |