I might just be reading this wrong, however, you opened a file with the handle FILE open (FILE, "$file_in_question");, (but you didn't catch for problems: open (FILE, "$file_in_question") || die "Oops";) so unless I'm just totally missunderstanding the code, you would want to print to FILE not OUT, i.e. print FILE "$year\t";.
But then again, I may be totally wrong...
Comment on Re: map function - print to file problem
I want to print to the output file and not the input file. The years do print to the file but not in the positions that I want them to. What I want is: Year\tAge\tNumber_of_males\tNumber_of_females. And this form needs to print on multiple lines. Sorry I should have mentioned that earlier.