develooper Front page | perl.perl5.porters | Postings from August 2016

Re: [perl #128940] "Use of uninitialized value $fh" mentions wrongvariable

Thread Previous
From:
Dave Mitchell
Date:
August 15, 2016 10:47
Subject:
Re: [perl #128940] "Use of uninitialized value $fh" mentions wrongvariable
Message ID:
20160815104726.GE3173@iabyn.com
On Mon, Aug 15, 2016 at 01:19:15AM -0700, l.mai@web.de wrote:
> $ perl -we 'print "" . open my $fh, "<", "no / such / file"'                                                     
> Use of uninitialized value $fh in concatenation (.) or string at -e line 1.
>                            ^^^
> 
> The uninitialized value is the result of the open call, not $fh. $fh isn't
> concatenated (and it isn't undef either; open sets it to \*{'main::$fh}').
> So $fh shouldn't appear in the error message.

Now fixed in blead with v5.25.3-249-g6b57d4b

-- 
You're only as old as you look.

Thread Previous


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