home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1998 July
/
Vpr9807a.iso
/
dos_text
/
fixtext.pl
< prev
next >
Wrap
Perl Script
|
1998-05-01
|
379b
|
21 lines
#!/usr/bin/perl
# This script adds DOS newlines to the textfile specified on the commandline.
if (length($ARGV[0]) == 0) {
die "You must specify a filename!\n";
}
open(ifp,"$ARGV[0]");
open(ofp,">newfile.temp");
while(<ifp>) {
chop;
print ofp "$_\r\n";
}
close ifp;
close ofp;
$cmd="mv -f newfile.temp $ARGV[0]";
system($cmd);
print "Conversion complete.\n";