http://www.perlmonks.org?node_id=912760


in reply to Use of uninitialized value error

Man, you did little mistake at last line. Variable should not put into double/single quote during assignment to another variable. Here last line should be ...

$HashOfDataBase {"$IdFasta"} = $FastaSeqOfDataBase;

instead of ....
$HashOfDataBase {"$IdFasta"} = "$FastaSeqOfDataBase";#that is the line of the error
Hopefully this will resolve your issue.

Replies are listed 'Best First'.
Re^2: Use of uninitialized value error
by chromatic (Archbishop) on Jul 05, 2011 at 06:54 UTC
    Variable should not put into double/single quote during assignment to another variable. Here last line should be ...

    That's generally good advice, but it's sometimes wrong (sometimes forcing string interpolation of a regex capture is the safest approach) and it won't make a difference in this case.

      You do get a warning if you try to interpolate an undefined variable into a string, but not from assigning it to another variable.

      If that is good or bad in OPs case depends on if it is ok for the variable to be undefined or not.