#!/usr/bin/perl use 5.008; use strict; use warnings; use File::Find; my $dir = '.'; my @found = (); my $i=2005; while (1){ my $path="$dir/$i"; last unless(-d $path); print "$path\n"; $i++; find({preprocess => sub { return sort @_ }, wanted => sub {if ($File::Find::name =~ /\d_12.*/){push @found, $File::Find::name;}}}, $path); } my $anzahl=@found; #print @found; print "\n\nAnzahl: $anzahl\n";