in reply to Re: parse /etc/passwd and output it as csv in hundred servers
in thread parse /etc/passwd and output it as csv in hundred servers

THank you what is the meaning of the two lines you added:
$user =~ s/:.*$//mg; $user =~ s/\n/,/g;

Replies are listed 'Best First'.
Re^3: parse /etc/passwd and output it as csv in hundred servers
by hippo (Archbishop) on Apr 13, 2018 at 17:22 UTC
Re^3: parse /etc/passwd and output it as csv in hundred servers
by Your Mother (Archbishop) on Apr 13, 2018 at 20:45 UTC

    Same thing hippo did but more idiomatic and less readable. :P

    say join ",", "hostname", $user =~ /^([^:]+)/gm;