if ($line =~ m/^To:\s+(\S+)/i) { $to = $1; print "To is: $to\n"; }