You don't need a different filehandle when you access files sequentially. Also the previous contents of the filehandle variable is quite meaningless to its use as a filehandle. So just use something like this:
for(my $i=0;$i<$#key;$i++) { my $val; #No need to put anything in it $output_file=$key[$i].$output_file; open($val,'>:utf8',"$output_file");
In reply to Re^3: Error coming while using Use Strict
by jethro
in thread Error coming while using Use Strict
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |