laziness, impatience, and hubris | |
PerlMonks |
Re: Uninitialized Value Hash Lookup Gene Symbolby graff (Chancellor) |
on Nov 05, 2015 at 22:23 UTC ( [id://1147054]=note: print w/replies, xml ) | Need Help?? |
As mentioned in the previous reply, if you're getting a bunch of "uninitialized variable" warnings, it's probably because the second file you're reading from doesn't have the kind of content that you're expecting on some (or any?) lines.
By the way, understand that "uninitialized" is a warning, not an error. Because you have use warnings; in your script (which is good), you are learning about things that are simply not going as expected; the script continues to run, and empty strings are being printed where you might be expecting non-empty strings. Given that this is the case, try to figure out where your expectations are not being met. Here's a modified version of the OP script, reformatted to be more compact (and "more perlish") - note how I'm adding some lines to check for unexpected conditions, and report them: Also, I added "use strict", and re-arranged things so that declarations of variables are placed closer to where the variables are actually used. (UPDATE: I added a bit more to report how many gene symbols were loaded from the first input, just in case that's informative.)
In Section
Seekers of Perl Wisdom
|
|