in reply to Re: Email Header
in thread Email Header

Thanks that last one got the from email address which is great, but now I have two other small problems :) getting the subject and the actual message - here is my code (the @message tags picks up all the MIME- lines)
while (<STDIN>) { last if /^$/; if ( $_ =~ /^From: (.+?)$/i ) { $newFrom = $1; $newFrom = $1 if $newFrom =~ /<(\S+)>/; } $subject = "$1" if /^Subject:(.+)$/; } while (<STDIN>) { push @message, $_; }