for $f (grep { ! ( /^\.{1,2}$/ or -l "$path/$_" ) } readdir(DIR)) { if ( -f _ ) { push @files, "$path/$f " . -s _; elsif ( -d _ ) { push @files, @{&files( "$path/$f" )}; } }