4 use Mail::Util qw(read_mbox);
9 -d $file or return ($file);
10 opendir DIR, $file or return ($file);
11 my @contents = map { recurse("$file/$_") } grep !/^\.\.?$/, readdir DIR;
16 my @folders = recurse "$ENV{HOME}/mail";
18 foreach my $folder (@folders)
20 my @messages = read_mbox($folder);
21 foreach my $message (@messages)
26 foreach my $line (@$message)
28 last if $line =~ /^$/;
29 if ($line =~ /^From:[ \t](.*)/)
33 if ($line =~ /^(?:To|Cc)/)
37 elsif ($line !~ /^[ \t]/)
43 if ($line =~ /cjw44|cjwatson/)
50 print "$from\n" if $print_from and defined $from;