in reply to how to convert new line to ","
Here's an example of reading the data in paragraph mode (see $/ for an explanation) and then applying your regex:
use strict; use warnings; local $/ = ""; while (<DATA>){ chomp; s/\n/,/g; print "$_\n"; } __DATA__ 1111 2222 3333 4444 5555 6666
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to convert new line to ","
by repellent (Priest) on Jul 25, 2008 at 08:07 UTC | |
by moritz (Cardinal) on Jul 25, 2008 at 08:40 UTC | |
by massa (Hermit) on Jul 25, 2008 at 09:37 UTC | |
by repellent (Priest) on Jul 27, 2008 at 02:35 UTC |