in reply to How to retrieve the string after the space???
The split function splits the line apart into an array in this case by spaces. Note that this could cause you pain if your addresses contain spaces!if ($line =~ m/To:/i) { ($header,$to) = split(/ /,$line); print "To is: $to\n"; }
|
---|