my %handles; my %count; sub get_file_handle { my $yr = shift; $count{$yr}++; return $handles{$yr} if exists $handles{$yr}; $handles{$yr} = IO::File ">>".$path."year$yr.txt"; } #### print get_file_handle($year) "$newline\n"; #### --- print map { my ($m)=1<