#\usr\bin\perl use strict; use warnings; opendir (DIR, '\mail') || die "Can't open \mail.\n"; for my $file (readdir DIR) { if (!open (WRITE, "\mail\$file")) { print "Can't open \mail\$file\n"; next; } my $text = ; print $text; }