[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] the BINMODE command



mark@cheers.jsc.nasa.gov (Mark Manning/Muniz Eng.) writes:
}I was just going through the old purple Perl book and came across this:
}
}binmode
}------------------------------------------------------------
}	binmode( FILEHANDLE )
}	binmode FILEHANDLE

A noop under both Unix and MacOS.  No need to worry about it.

}
}This function....
}(and then paragraph two...)
}
}On systems that distinguish binary mode from text mode,

Here's what the perlfunc man page says about it (I expect they're being a
little more honest here than in the Camel :-))

             Binmode has no effect under Unix; in MS-DOS and
             similarly archaic systems, it may be imperative--
             otherwise your MS-DOS-damaged C library may mangle
             your file.  The key distinction between systems that
             need binmode and those that don't is their text file
             formats.  Systems like Unix and Plan9 that delimit
             lines with a single character, and that encode that
             character in C as '\n', do not need binmode.  The
             rest need it.  If FILEHANDLE is an expression, the
             value is taken as the name of the filehandle.

[snip]

--------
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693
Greenbelt, MD 20770
schinder@pjstoaster.pg.md.us


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch