in reply to read the file and assign each line to a hash????

You mean, other than using Email::Simple?

#!/usr/bin/perl use strict; use warnings; open my FILE, '<', $ARGV[0] or die "Can't read $ARGV[0]: $!"; my %header; while (<FILE>) { chomp; # trim trailing newline my ($k, $v) = split(': ', $_, 2); $header{$k} = $v; } # now $header{To} eq 'san<sanjay@36.212.176.07>' &etc.
<radiant.matrix>
A collection of thoughts and links from the minds of geeks
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet