my $LumberFile="$Dir/$Subdir/lumber.wrl"; open my $Lumber_fh, '<', $LumberFile or warn "Ooops Cannot Open Lumber File: $LumberFile !! \n Proceeding using STDOUT"; my $out_fh = *STDOUT unless (defined $Lumber_fh); ... As a style point, I add "_fh" ("filehandle") as a suffix to remind myself that this variable is a filehandle and not some integer or other thing. The "*" in front of STDOUT is critical! This allows the "translation" of the bareword filehandle STDOUT into the lexical program variable "my $out_fh". Without that, Perl figures that STDOUT is a string. Now you can pass $out_fh as a parameter to other subs or use it yourself, e.g. print $out_fh "something";