Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Conversion of unix LF to DOS LF issues

by ikegami (Patriarch)
on Feb 01, 2006 at 23:26 UTC ( [id://527192]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Outputs file in DOS format.
    # Accepts input files in unix format.
    ...
       open my $fh_out, ...;
       print $fh_out while <$fh_in>;
    }
    
  2. or download this
    # Outputs file in DOS format.
    # Accepts input files in unix format.
    ...
          print $fh_out "$_\r\n" 
       }
    }
    
  3. or download this
    # Outputs file in DOS format.
    # Accepts input files in unix, DOS and Mac formats.
    ...
       binmode($fh_out);
       print $fh_out $text;
    }
    
  4. or download this
    # Outputs file in local format.
    # Accepts input files in unix, DOS and Mac formats.
    ...
       open my $fh_out, ...;
       print $fh_out $text;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://527192]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2025-04-19 23:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.