in reply to Perl to Add newline at the end of each row of comma seperated strings in an array ?

At a glance, it looks like it should work. What output are you seeing now?

I don't have that module installed, but try this. Note I've moved $name to within the while, and removed $row entirely as it wasn't used.

while (my $data = $ss->getNextRow()){ my $name = join(',', @$data) . "\n"; push @csvtemp, $name; }

PS. It will greatly help you out in the long run if you use consistent spacing in your code, especially indenting blocks properly.

  • Comment on Re: Perl to Add newline at the end of each row of comma seperated strings in an array ?
  • Select or Download Code