in reply to how to convert new line to ","
#!/usr/bin/perl use warnings; use strict; my $x = do {local $/; <DATA>}; $x =~ s/\n/,/g; $x =~ s/,,+/\n/g; print $x; __DATA__ 1111 2222 3333 4444 5555 6666
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to convert new line to ","
by moritz (Cardinal) on Jul 24, 2008 at 09:56 UTC | |
by pjotrik (Friar) on Jul 24, 2008 at 10:14 UTC |