Help for this page

Select Code to Download


  1. or download this
    open (FH,'>',"linefeed.txt");
    # binmode FH;  # I have added this line
    ...
    
    __END__
    This is  a line^M  (viewed under gvim on win XP SP 2)
    
  2. or download this
    This is  a line (NOTE: no ^M)<p>
    
  3. or download this
    perldoc -f binmode
    On some systems (in general, DOS and Windows-based systems) binmode() 
    +is necessary when you're not working with a text file.  For the sake 
    +of portability it is a good idea to always use it when appropriate, a
    +nd to never use it when it isn't appropriate.