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