in reply to Re^2: Perl one-liner for array at bash shell
in thread Perl one-liner for array at bash shell

m#.*,# is the same as /.*,/ but the slashes were already used by s///, and the vars are $\ (set by perl -l to "\n", see perlrun) and $&. Same thing:
perl -ple 's{ [;\s]+ }{ m{.*,}; $/ . $& }egx' perl -ple '($a)=/(.*,)/; s/[;\s]+/\n$a/g'