Cody Pendant has asked for the wisdom of the Perl Monks concerning the following question:
More or less by trial an error, I've discovered that when I read them back in, by doing this:
open(FILEHANDLE,'filename.txt');<BR> @theFile = <FILEHANDLE>; $thefile = join('',@theFile);
...the file's lines are separated by \r\n, or more precisely, the only way I can transform it into HTML by replacing linebreaks with <BR> tags or P tags for double line breaks is by replacing those two characters.
Why is this? Why isn't it just \n for instance?
--
($_='jjjuuusssttt annootthhrer pppeeerrrlll haaaccckkeer')=~y/a-z//s;print;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: The Mysteries Of LineBreaks
by Tardis (Pilgrim) on Mar 12, 2002 at 11:06 UTC | |
by Cody Pendant (Prior) on Mar 12, 2002 at 20:10 UTC | |
|
Re: The Mysteries Of LineBreaks
by broquaint (Abbot) on Mar 12, 2002 at 10:24 UTC | |
|
Re: The Mysteries Of LineBreaks
by Dog and Pony (Priest) on Mar 12, 2002 at 09:55 UTC |