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


In reply to Uninitialized value in string warnings (was: Warnings:) by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.