I see what ur saying and actually agree with u. But PerlIO automatically (this is one automatic thing I don't like) translates between CRLF and LF on Windows systems. As Jan said setting binmode() will solve ur problem.
I personally feel that binmode should be the default everywhere and it should be the programmer's responsibility to decide how to interpret the new line sequences. FYI there are three possible new line sequences, CR, CRLF, and LF, depending on what system ur on. In this day and age it's no longer useful to assume what kind of new line sequences u have based on ur system type. U might very well have to deal with all three at the same time or a contrary type to ur system's native type. 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* ;) HTH At 11:24 AM 12/27/2007 -0500, Bullock, Howard A. wrote: >I appear that perl's print command when using a file handle is changing >each occurrence of chr(10) to (chr(13) chr(10)). This does not seem to >be a helpful or proper action when working with defined literal strings. > >I can make some sense out of >file:///C:/Perl/html/lib/Pod/perlport.html#newlines but do see how that >is relevant to literal printing strings. -- 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