in reply to Substitution operator troubles
As far as I can tell you are only missing the global flag. That is:
Should be:$tool =~ s/<infile>/$file/;
$tool =~ s/<infile>/$file/g;
In Section
Seekers of Perl Wisdom