note
mdillon
<p>can't you split on the value of <tt>$/</tt>? (whose value is presumably related to <tt>$^O</tt> in the Perl source code and hence will always be in synch):</p>
<code>my @lines = split m#$/#, $content;
</code>
<p>or how about just splitting on any line ending?:</p>
<code>my @lines = split m#\x0d\x0a?|\x0a#, $content;
</code>
<p>to get around the multiple <tt>0x0d</tt> problem, you could add <code>\x0d+\x0a</code> to the alternation as the first alternative (though it will slow things down on a Unix file with a lot of blank lines). come to think of it, <code>\x0d{2}\x0a</code> might be a better idea.</p>
<p>for EBCDIC, i think the first solution i mentioned should work.</p>
<p>for some reason, i feel like i'm missing something fundamental about your question, so if i'm just spouting crazy-talk, please ignore me.</p>
103256
103256