in reply to concatenating strings

Just make cleaner style and maybe you'll see you error:
my $file_name = 'file'; print "Enter the number in the first batch file:\n"; $f=<STDIN>; print "Enter the number in the last batch file:\n"; $l=<STDIN>; for( $f..$l ){ my $file="$file_name$_.bat"; system($file) == 0 or die $?; sleep(2); }