http://qs321.pair.com?node_id=571725


in reply to How to retrieve the string after the space???

TIMTOWTDI!

if ($line =~ m/To:/i) { ($header,$to) = split(/ /,$line); print "To is: $to\n"; }
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!
----
My mission: To boldy split infinitives that have never been split before!