in reply to Re^2: problem with 'bare LF' in script
in thread problem with 'bare LF' in script
where \r is a carriage-return and \n is a line-feed. This code will convert every type of line ending to a CR-LF pair.$str =~ s/(\r\n|\n\r|\r|\n)/\r\n/sg;
Update: removed parenthesis from replacement text
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: problem with 'bare LF' in script
by GrandFather (Saint) on Nov 12, 2008 at 02:49 UTC | |
by gone2015 (Deacon) on Nov 12, 2008 at 18:59 UTC | |
by GrandFather (Saint) on Nov 12, 2008 at 19:42 UTC | |
by gone2015 (Deacon) on Nov 13, 2008 at 00:47 UTC | |
by GrandFather (Saint) on Nov 13, 2008 at 01:49 UTC | |
by ikegami (Patriarch) on Nov 12, 2008 at 21:41 UTC | |
by gone2015 (Deacon) on Nov 13, 2008 at 01:15 UTC | |
| |
by ikegami (Patriarch) on Nov 12, 2008 at 21:35 UTC |