use strict; use warnings; use Win32::File qw/GetAttributes HIDDEN SYSTEM/; use File::Find; find( \&foobar, 'D:\perl' ); sub foobar { my $file = $_; my $attributes = 0; GetAttributes( $file, $attributes ); return if $attributes & ( HIDDEN | SYSTEM ); print "$file\n"; }