I don't see why you need to substitute \n with commas to start with, if you're going to split the strings....
foreach my $text ( @test ) { my @elements = split( /\n/, $text ); # do something with @elements }
... would suffice, no?
In reply to Re: Substitution
by lestrrat
in thread replacing one or more newlines with commas
by Kiko
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |