in reply to Closing a system process after file creation (was: One for the Wisest Monks)

Your system call is waiting for input from stdin. You could call 'touch' instead, but how about a pure perl solution?

{ my $fh; open $fh, '>', "/path/to/${num}.bat" or die $!; }
You are likely to want a more economical representation of your counter, sooner or later. You should think about flock when you design it.

After Compline,