my $file = $ARGV[0]; my $repl = $ARGV[1]; open INFO, "<", $file or die $!; while () { s/(Absolute_Error_Tolerance=&Quot;)1e-15(&Quot)/$1$repl$2/; print; } close INFO; #### perl -n -e "s/(Absolute_Error_Tolerance=&Quot;)1e-15(&Quot)/$1$ARGV[0]$2/; print;" filename #### @echo off perl -n -e "s/(Absolute_Error_Tolerance=&Quot;)1e-15(&Quot)/$1%2$2/; print;" %1 #### batchfilename datafile replacement