in reply to Re: unix to windows?
in thread unix to windows?
package GlobArgv; use strict; my $file = (); my $line = (); @ARGV = map { glob } @ARGV; 1; foreach $file(@ARGV) { my $string; $/ = ""; foreach ($file) { open (FILE, $_); $string = <FILE>; close FILE; $string =~ s/\r\n/\n/sig; $string =~ s/\r/\n/sig; open (FILE, ">$_"); print FILE $string; close FILE; } rename ($file, "$file.txt") or die "can't rename $file: $!"; print "process completed for: $file \n"; 2;
|
|---|