{ my $fh; open $fh, '>', "/path/to/${num}.bat" or die $!; }