while ($line = <>) { if ($line =~ m/^\s*$/ ) { # If we have an empty line... last; # this immediately ends the `while' loop. } if ($line =~ m/^Subject: (.*)/i) { $subject = $1; } if ($line =~ m/^Date: (.*)/i) { $date = $1; } if ($line =~ m/^Reply-To: (\S+)/i) { $reply_address = $1; } if ($line =~ m/^From: (\S+) \(([^()]*)\)/i) { $reply_address = $1; $from_name = $2; } } ----------------------------------------------------------------------------- Copyright 1997-2024 Jeffrey Friedl