Help for this page

Select Code to Download


  1. or download this
    33188 decimal = 100644           octal  (first printf)
    07777 octal   = 0000111111111111 binary (mask)-|
    ...
                    ^^^^
                      |
                      + - file type masked out
    
  2. or download this
    use Modern::Perl;
    
    ...
    my $modeResult = sprintf '%04o', $mode & 07777;
    
    say $modeResult; # prints 0644