Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#!/usr/bin/perl
# get filename from arguments
my $filename = shift @ARGV;
# use the stat() function to build a file attribute array
my $mode = (stat($filename))[2];
# print it out in octal
printf "mode is %04o\n", $mode & 07777;
# alternatively, convert $mode to octal with Bit::Vector
use Bit::Vector;
my $vec = Bit::Vector->new_Dec(16, $mode);
$mode = reverse join('', $vec->Chunk_List_Read(3));
$mode =~ s/^(\d*)(\d{4})$/$2/;
my $type = $1;
print qq~mode is $mode, type is $type\n~;