At 10:36 AM 8/3/00 +0900, Simon Cozens wrote:
>On Wed, Aug 02, 2000 at 04:26:56PM -0700, Nathan Wiger wrote:
> > I tend to agree with Tom's argument here. open() is kind of funny
> > anyways. Why couldn't it work like this, similar to FileHandle:
> >
> >    $fh = open $filename;
>
>Testing for failure. It's a basic tenet that system calls can be
>tested for success and failure by their returned truth values. I
>believe we should keep this.

Um, what stops open returning undef on failure (and setting $!), so I could do

         $fh = open $filename or die "open $filename failed: $!\n";

--
Peter Scott
Pacific Systems Design Technologies

Reply via email to