in reply to Substitution operator troubles
$tool =~ s/<infile>/$file/; [download]
$tool =~ s/<infile>/$file/g; [download]