my $batchfile = "/tmp/batchfile.$$"; open my $bfd, '>', $batchfile or die $!; print $bfd <