Returning error status or throwing exception?



foreach my $filename (@names) {
    my $fh = open_file($filename);
    my $data = read_file($fh);
}

What if open fails and the $fh is undef? Who will notice this problem? Only in read_file we will notice it.