If the first argument ($fh) is undefined (as it is in this case), open will initialize it to some arbitrary value (see the Symbol::genysm method) before it attempts to open the file. So $fh will always be "true" even if the open call fails.