diff options
Diffstat (limited to 'fixpaths')
-rwxr-xr-x | fixpaths | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -37,14 +37,13 @@ for $f (@ARGV) { | |||
37 | $of = $2.".$ext"; | 37 | $of = $2.".$ext"; |
38 | 38 | ||
39 | open(IN, "<$f") || die ("$0: input file $f missing!\n"); | 39 | open(IN, "<$f") || die ("$0: input file $f missing!\n"); |
40 | if (open(OUT, ">$of")) { | 40 | open(OUT, ">$of") || die ("$0: cannot create output file $of: $!\n"); |
41 | while (<IN>) { | 41 | while (<IN>) { |
42 | for $s (keys(%def)) { | 42 | for $s (keys(%def)) { |
43 | s#$s#$def{$s}#; | 43 | s#$s#$def{$s}#; |
44 | } # for $s | 44 | } # for $s |
45 | print OUT; | 45 | print OUT; |
46 | } # while <IN> | 46 | } # while <IN> |
47 | } # if (outfile open) | ||
48 | } # for $f | 47 | } # for $f |
49 | 48 | ||
50 | exit 0; | 49 | exit 0; |