Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

RE: RE: RE: RE: RE: Answer: How do I get all the permission flags on a file?

by merlyn (Sage)
on Sep 26, 2000 at 19:23 UTC ( #34028=note: print w/replies, xml ) Need Help??


in reply to RE: RE: RE: RE: Answer: How do I get all the permission flags on a file?
in thread files

sub return_mode { my $mode = shift; my @modelist = (($mode & 7000)>>9, ($mode & 0700)>>6, ($mode & 007 +0)>>3, ($mode &0007)); return join('', @modelist); } print return_mode (07777), "\n";
prints 5777 on my machine. Nuff said. Your code has 7000 where it needs 07000.

-- Randal L. Schwartz, Perl hacker

  • Comment on RE: RE: RE: RE: RE: Answer: How do I get all the permission flags on a file?
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://34028]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2020-12-05 14:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (64 votes). Check out past polls.

    Notices?