in reply to Re^4: Error coming while using Use Strict
in thread Error coming while using Use Strict

Your are creating five files, but one after another. So you can reuse one filehandle for all five files. Only if you had more than one file open at the same time(!) would you need more than one filehandle. In that case use this:

my @key; for(my $i=0;$i<5;$i++) { $output_file=$key[$i].$output_file; open($key[$i],'>:utf8',"$output_file"); my $f= $key[$i]; print $f $start."\n"; ...