Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Conversion of unix LF to DOS LF issues

by ikegami (Pope)
on Feb 01, 2006 at 23:26 UTC ( #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
Node Status?
node history
Node Type: note [id://527192]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2020-11-27 02:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?