in reply to concatenating strings

1. Do a chomp after you read from STDIN.
2. To concatenate you use '.'. Eg. $concatfile=$t . $i;
3. Move the $t="file"; out of the loop, if you aren't changing it in the loop.
4. use strict; use warnings; and use my.
5. Instead os system, do a print "$file\n";. See the command you are issuing. You could try specifying the full path to the .bat file.
6. Use the perl debugger. perl -d scriptname