my $directory = ('../htdocs/archive/'); my $prefix = 'Arch'; my $suffix = 'php'; my @dateien = glob($directory.'/'.$prefix.".*".$suffix); opendir DIR, $directory or die $!; while (my $entry = readdir DIR) { ... } closedir DIR;