in reply to Strip everything but an email address
my @emails = ( 'To: <firstone@somewhere.com>', 'To: You and I <secondone@somewhere.com>', 'To: thirdone@somewhere.com' ); for (@emails) { /^To:\s*[^<]*<([^>]+)>/ || /^To:\s*(.+)$/; print $1, $/; } [download]