use Win32::File qw(GetAttributes HIDDEN); my $attr; if (GetAttributes($src, $attr)) { if ($attr & HIDDEN) { # whatever.... } } else { warn "Error getting attributes of $src"; }