Mail::Internet is a useful module for parsing email messages.
If you don't want the overhead of using modules, you could do something like:
my $from; while (<MAIL>) { my $mail = $_; chomp $mail; next unless substr($mail, 0, 6, '') eq 'From: '; $from = $mail; last; } print "Mail from : $from\n";
In reply to Re: Extracting info
by tomhukins
in thread Extracting info
by HTTP-404
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |