I thought you were asking why there was no separation of the email addresses in the second and third lines of the output shown. Seems like I got that wrong: sorry.
I did go back and studied the question more closely. I note that you've used identical code for both the "prints nothing" and the "prints something":
while (split(/[, ]+/, <DATA>)) { print @_ }
I suspect the first block should have "print $_", not "print @_".
— Ken
In reply to Re^7: Splitting in while loop
by kcott
in thread Splitting in while loop
by tel2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |