Ok this is my problem. I have a file which contains email header info.I have written code below to parse through it for the To: line off a spreadsheet of usernames.Once i get a match what i would like to do is move that particular header to another file.At the moment it just rewrites the entire file to the temp file. The other problem i have is that the To: line is near the end of the header so how do i get it to remove from the start of that particular header to the end of it????
.....
.....
.....
foreach (@array)
{ my $list;
$list = $array[$counter];
$count ++;
$usrname;
if (/To[^\@]+)/)
{
$usrname = $1;
}
for (my $counter=0;$counter<$#data+1;$counter++)
{
$temp = "\L$data[$counter]";
#print "$temp\n";
#print $usrname if($usrname =~ $temp);
if ($usrname eq " $temp"
{
$array[$counter] = $usrname;
}
}
$usrname = "";
}
...........
I hope i have explained this alright!!!Has anybody any ideas if you do great!!!
.....
.....
.....
foreach (@array)
{ my $list;
$list = $array[$counter];
$count ++;
$usrname;
if (/To[^\@]+)/)
{
$usrname = $1;
}
for (my $counter=0;$counter<$#data+1;$counter++)
{
$temp = "\L$data[$counter]";
#print "$temp\n";
#print $usrname if($usrname =~ $temp);
if ($usrname eq " $temp"
{
$array[$counter] = $usrname;
}
}
$usrname = "";
}
...........
I hope i have explained this alright!!!Has anybody any ideas if you do great!!!