use File::Find; my $base = "c:/blub"; my $ext = "html|js"; find( sub { push(@dateien, $File::Find::name) if ( /\.($ext)$/i && -T); }, $base );