So, let me just give a solution to this problem, without any further explenation.
#!/usr/bin/perl
use strict;
open(FH,"> some_file.txt");
print FH "Write first line to the file";
writeToFile(*FH);
sub writeToFile {
my $FH = shift;
print $FH "Write second line to the file";
}
Hence, one must remember that when we past a file handler to a function in Perl, we must do it using '*', no other way that I know of works.