On Fri, 28 Dec 2007, Chris Wagner wrote:
> It would be nice if there were a :text IO layer that would automatically
> determine the new line sequence of a particular text file and do the
> translation, or not, automatically.  Currently u have to do an obnoxious
> manual inspection of the file to know what $/ is. *cough*Jan*cough* ;)

I'm not sure what you are trying to say here.  While reading a file
in text mode on Windows, it does not really matter if the lines are
terminated by CRLF or LF alone; the CR will be stripped and at the
Perl level you always have just a LF, just like on Unix.

Files with CR line endings are extremely rare nowadays; as far as I
know only Mac OS up to version 9 used those.  Everyone using a Mac
is running OS X now, which uses LF line endings just like any other
Unix-derived system.

And anyways, you cannot know the line endings of a file until you have
read all of it, which is not really practical for a streaming IO layer.

Cheers,
-Jan

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to