On Tue, Oct 30, 2018 at 11:45:02AM +0000, Charles Johnson wrote:
> On 29/10/2018 20:39, RS wrote:
> >That is not the end of the problem.  Ralph also pointed out that if 
> >Perl thought it was running under Windows
> I know very little Perl, but i'm surprised it should care about line 
> separators. In Java, one of the oldest classes for reading text files 
> (BufferedReader) doesn't care what line separators it finds. Roughly 
> speaking it will split on /[\r\n]+/ (though not via regex) and will will 
> thus read the text files of any platform correctly. Surely there's at 
> least a module that will do the same in Perl?

In perl the default is to assume the local machine's line seperator. You
can of course change this. There's probably something on the CPAN that
will wrap it up all neat and tidy so that you don't have to worry about
writing portable code.

-- 
David Cantrell | Official London Perl Mongers Bad Influence

    There are many different types of sausages.  The best are
    from the north of England.  The wurst are from Germany.
      -- seen in alt.2eggs...

_______________________________________________
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer

Reply via email to