Tutorials Point


  Perl Home

  PERL Functions

© 2011 TutorialsPoint.COM


  Home     References     About TP     Advertising  

PERL binmode Function



Syntax

binmode FILEHANDLE


Definition and Usage

Sets the format for FILEHANDLE to be read from and written to as binary on the operating systems that differentiate between the two. Files that are not in binary have CR LF sequences converted to LF on input, and LF to CR LF on output. This is vital for operating systems that use two characters to separate lines within text files (MS-DOS), but has no effect on operating systems that use single characters (Unix, Mac OS, QNX).

Return Value

  • undef on failure or invalid FILEHANDLE

  • 1 on success



Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names