in reply to Re: "uninitialized value in subroutine exit" warning from CGI.pm
in thread "uninitialized value in subroutine exit" warning from CGI.pm
I don't know what's going on at subroutine exit that would trigger the warningOn subroutine return, any return values are copied. If you return a substr lvalue, this will trigger the uninit warning at this point. For example this warns:
This is behaviour I would expect, and I'm not seeing a bug.sub f { $_[0] } $a = f(substr(undef,0,1));
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: "uninitialized value in subroutine exit" warning from CGI.pm (updated)
by haukex (Archbishop) on Nov 10, 2017 at 15:45 UTC |