Hello,

i am facing the following error in the cgi.log file:

Use of uninitialized value $FastaSeqOfDataBase in string at anagnos43.pl line 549, <YEASTFASTA> chunk 6408.

The error has to do with this line of my code:

$HashOfDataBase {"$IdFasta"} = "$FastaSeqOfDataBase";
I am trying to understand why is that happening since i have initiliaze all the values (or at least that i think).
my %HashOfDataBase = (); my $IdFasta = ""; if($Data=~/^(\S+)\s+\S+\s+.*/) { $IdFasta=$1;#storing name } @ArrayFasta=split '"',$Data; $FastaSeqOfDataBase = $ArrayFasta[2];#storing letters of the alphabet +like a,b,d,e.. #use this if to initiliaze the "$HashOfDataBase {$IdFasta}" if ($Flag == 0) { $Flag = 1; $HashOfDataBase {"$IdFasta"} = ""; } $HashOfDataBase {"$IdFasta"} = "$FastaSeqO +fDataBase";#that is the line of the error

Really many thanks in advance


In reply to Use of uninitialized value error by birdy

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.