6 # Syntax: ReplaceValues.pl [<var1>=<Subst1> [<var2>=<Subst> ...]] <Inputfile> [<Inputfile> ...]
9 # Parse Arguments for strings to substitute
14 if ($arg =~ /^([^=]+)=(.*)$/) {
18 # $arg should be filename here
19 &SubstituteDataInFile($arg);
25 #################################################################
26 sub SubstituteDataInFile($)
28 open(FI, '<', $InFile) || die("Could not read \"$InFile\"");
29 while (my $l = <FI>) {
30 print &SubstituteDataInLine($l);
35 sub SubstituteDataInLine($)
38 for my $k (keys %Subst) {
39 while ($result =~ s/\b$k\b/$Subst{$k}/) {