open( OUTPUTFILE, '>', $position_output_path ) or die "Couldn't open $position_output_path\n$!"; foreach my $row ( @rows ) { print OUTPUTFILE $row, "\n"; } close( OUTPUTFILE ) or die "Couldn't close $position_output_path\n$!";