Help for this page
$_ = "-r-x-w-rwx"; # Mode string in $_ my $bits = 0; ... $_ ne "-" and $bits++; } printf "My bits are: %o\n", $bits;