Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
And here is the result:sub test2{ return "HTML"; } sub test { return join '', test2("1", "$ENV{'HTTP_HOSTS'} "); } print test();
I am using perl, v5.8.3 built for MSWin32-x86-multi-thread. The second argument passed to test2 is undef, but why would that cause this error? Notice that test2 still returns "HTML". And how best to correct this error?C:\WINDOWS\system32\cmd.exe /c sh $ perl -w test.PL Use of uninitialized value in concatenation (.) or string at test.PL l +ine 11. HTML$
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why does an undef argument in a join produce this warning?
by wfsp (Abbot) on Apr 24, 2008 at 06:14 UTC | |
by Anonymous Monk on Apr 24, 2008 at 06:23 UTC | |
by mscharrer (Hermit) on Apr 24, 2008 at 08:37 UTC | |
by wade (Pilgrim) on Apr 24, 2008 at 16:04 UTC | |
|
Re: Why does an undef argument in a join produce this warning?
by chromatic (Archbishop) on Apr 24, 2008 at 06:12 UTC | |
by Anonymous Monk on Apr 24, 2008 at 06:18 UTC |