develooper Front page | perl.perl5.porters | Postings from September 2018

Re: [perl #133505] open() dies for invalid modes, instead ofreturning undef, as documented

Thread Previous | Thread Next
From:
"R. Diez" via perl5-porters
Date:
September 11, 2018 04:46
Subject:
Re: [perl #133505] open() dies for invalid modes, instead ofreturning undef, as documented
Message ID:
1107764698.2322010.1536418680358@mail.yahoo.com


> [...]
> Given that, it shouldn't be surprising that you get what
> is indeed a run-time error when you use open with an invalid mode.

I think you misinterpreted my report. Getting a run-time error is fine. The trouble is, the documentation states that run-time errors in open() are signalled by returning "undef", but in this particular case, open() dies itself, instead of returning undef. So my own "die" statement afterwards does not run at all. Try my example and you will see what I mean.


Best regards,
  rdiez

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About