I have an array, which carries the file names that I am going to create. I have written the code below that creates a single file at a time.
use strict;
use File::Slurp;
my @files_to_create=(file_1,file_2......file_100000);
my $File_Con="blah blah...";
foreach my $create_file(@files_to_create){
&Make_File($create_file);
}
sub create_file{
my $to_make=shift;
write_file($to_make,$File_Con);
}
I would like to share the sub routine for multiple scalars in an array.. Hence I can reduce the file creation time.. Can anyone suggest the steps to do...?