open DIR, "/mail"; #### foreach my $f (glob ("/mail/*.*")) { open my $fh, "<", $f; print scalar <$fh>; }