in reply to How to determine a file's type via stat()
file type is still just a bit string, but see the bottom of the above linked page for how to interpret those bits.my @stat_info = stat($filename); my $file_mode = $stat_info[2]; ... # or my $file_mode = (stat($filename))[2]; my $file_type = S_IFMT($file_mode)
|
|---|