while (split(/[, ]+/, )) { chomp; print "'$_'\n"; } __DATA__ me@here.com those@there.com others@there.com you@there.com,them@there.com #### '' '' '' #### 'me@here.com' 'you@there.com' 'them@there.com' 'those@there.com' 'others@there.com'