use warnings; use strict; use Email::Address; while () { for my $addr (Email::Address->parse($_)) { print $addr->address, "\n"; } } __DATA__ 'me'@here.com, "West, Casey" "those,foo"@there.com others@there.com you@there.com,them@there.com "Hello, World"@example.com