At 10:17 AM 1/3/2008 -0800, Mike Gillis wrote: >You might want to take a look at PerlIO::eol, an IO layer which does >basically what you're asking for. > > From the docs: > >"This layer normalizes any of CR, LF, CRLF and Native into the >designated line ending. It works for both input and output handles."
Cool, I'll check that out. It would be nice if this kind of functionality as well as the ability to return the NLS could be incorporated into PerlIO core. >open my $crfile, "<", $filename or die("Couldn't open $filename: $!"); >my @lines; >{ > local $/ = "\r"; > @lines = <$crfile>; >} Right. I just felt like doing split there for some reason. ;) -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- "...ne cede malis" 00000100 _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs