in reply to white space substitution

You need to tell s/// what string to work on:

$members =~ s/\s+/\n/g;
Also, you didn't want \w ( any word character) to be substituted. changed to one or more whitespace

After Compline,
Zaxo