http://qs321.pair.com?node_id=955376

abcdefg has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to use an executable through my perl script which takes an input file and gives an output file with name output_.$inputfile. I want to check if this file output_.$inputfile already exists and if it already exist then add a numerical suffix as that can be incremented for each run. How can I do that.

$abc_cmd = "abc.exe -i $input_file -o output_$input_file ";