develooper Front page | perl.perl5.porters | Postings from February 2017

Re: The tricky issue of do()

Thread Previous | Thread Next
February 23, 2017 20:24
Re: The tricky issue of do()
Message ID:
Todd Rinaldo wrote:
>Wow! I assumed it would die. But it's even worse. $@ appears to be empty.
>I think you have to check $! for do.

Yeah, that too.  The formulation one normally wants for do is

	do "" or die $@ || $!;

That a failure can show up in either $! or $@, and is never signalled
as an exception, is long-standing and documented.  We can't change this.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About