Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Fellow Monks please lend an ear...suggestions/comments on how to convert absolute (octal) file permission to Unix notation...

by mikfire (Deacon)
on May 24, 2001 at 02:34 UTC ( #82764=note: print w/replies, xml ) Need Help??


in reply to How to convert absolute (octal) file permission to Unix notation...

Hmm. I hate it when this happens. You are printing the number in its *decimal* representation, not the octal. To see the mode in octal, you need printf:
printf "Mode(%04o) $username(%s) $grpname(%s)\t%d bytes %d blocks\n", + $mode, $uid, $gid, $size, $blocks;
should show you what you are expecting.

mikfire

  • Comment on Re: Fellow Monks please lend an ear...suggestions/comments on how to convert absolute (octal) file permission to Unix notation...
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://82764]
help
Chatterbox?
[Corion]: Discipulus: I think Module::Corelist ( or corelist ) can tell you that
[Corion]: Meh - Module::CoreList
[choroba]: Just use List::Util 1.29
[choroba]: Be kind to people using old Perl with newer version of the module
[Corion]: But why not simply specify 'List::Util' => 1.29 in your prerequisites? People might install a more recent version of the module into their Perl
[Corion]: (what choroba said)
[Discipulus]: ah! simpler and cleaner

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2017-05-25 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?