diff options
Diffstat (limited to 'rhtvision/fromunix.pl')
-rw-r--r-- | rhtvision/fromunix.pl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/rhtvision/fromunix.pl b/rhtvision/fromunix.pl new file mode 100644 index 0000000..e6d4603 --- /dev/null +++ b/rhtvision/fromunix.pl @@ -0,0 +1,28 @@ +open(FI,"lista.dos") || die "Can't open lista"; + +while ($a=<FI>) + { + chop($a); + + if (length($a)) + { + &ToDOS($a) || die "Failed to convert $a"; + } + } + +sub ToDOS +{ + local $/; + my $b; + my $a=$_[0]; + + print "Processing $a\n"; + open(FIL,$a) || return 0; + $b=<FIL>; + $b =~ s/[!\r]\n/\r\n/g; + close(FIL); + + open(FIL,">$a") || return 0; + print FIL ($b); + close(FIL); +} |