すみませんコード部下二行、間違えていました。訂正です。
open my $fh, "<", "test.txt";
print read_file1($fh);
print read_file2($fh);