Re: RFC 69 (v2) Standardize input record separator (for
[email protected] (Chaim Frenkel) 10 Aug 2000 15:47:12 -0400
| Newsgroups | perl.perl6.language.io |
|---|---|
| Message-ID | <[email protected]> |
I completely disagree. How do you know that I want 5 lines. Perhaps I want only 3? You are assuming that within my file I will want all possible line endings to be line endings. That is simply not true. You might want to argue for the perl IO subsystem to intuit the line ending (note the singular) in use and then handle it correctly. But there is no way that I want under, any circumstance, _all_ line endings active at the same time. <chaim> >>>>> "PRL" == Perl6 RFC Librarian <[email protected]> writes: PRL> Given this input file (in UTF-8): PRL> D O S CR LF 0044 004F 0053 000D 000A PRL> U n i x LF 0055 006E 0069 0078 000A PRL> M a c CR 004D 0061 0063 000D PRL> l i n e LS 006C 0069 006E 0065 2028 PRL> p a r a PS 0070 0061 0072 0061 2029 PRL> This should work as expected on as many platforms as possible: PRL> my @lines = <FH>; PRL> The @lines array should contain five elements. -- Chaim Frenkel Nonlinear Knowledge, Inc. [email protected] +1-718-236-0183