Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Is there an easy way to lookup the causes and possible solutions to the use warnings messages?
The particular one I am getting is: warning: Use of uninitialized value in string at script.pl line 14.
14:my $c = "$a$b";
At this point, $b may or may not contain anything - if its does, it want it if not that's ok too.
I tried my c$ = "$a$b" if ($b); but that means c$ doesn't get defined if b$ has no value. So then I have to move to my c$ = ($b) ? "$a$b" : "$a"; but that seems a bit hookey to prevent a warning about something I knew would be true and didn't mind?
Is there a better way of avoding the warning?
Edit kudra, 2002-06-08 Changed title
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Warnings:
by Zaxo (Archbishop) on Jun 08, 2002 at 01:22 UTC | |
by Anonymous Monk on Jun 08, 2002 at 08:45 UTC | |
by Anonymous Monk on Jun 08, 2002 at 12:14 UTC | |
Re: Warnings:
by samtregar (Abbot) on Jun 08, 2002 at 01:31 UTC | |
Re: Warnings:
by vagnerr (Prior) on Jun 08, 2002 at 01:31 UTC | |
by Anonymous Monk on Jun 08, 2002 at 08:55 UTC | |
Re: Warnings:
by jsprat (Curate) on Jun 08, 2002 at 02:31 UTC | |
by Anonymous Monk on Jun 08, 2002 at 08:57 UTC | |
Re: Warnings:
by ariels (Curate) on Jun 08, 2002 at 08:12 UTC | |
by Anonymous Monk on Jun 08, 2002 at 09:12 UTC | |
by Util (Priest) on Jun 09, 2002 at 04:11 UTC |