I have a feeling that you are not using strict. Use it, make your code work with it, e.g., use 'foreach my $entry (@GILIST) {...', and see if your problem becomes apparent. If it does not become apparent, at least problems will be easier to find (for all of us).
Comment on Re: one of these codes is not like the other
I followed your suggestion, and ended up with 20 or so: Global symbol "%blahblah" requires explicit package name. so I remedied this by adding "my"'s to my variables. But there's a syntax error I don't get: it's near "$specieslist{" of the following line of code:
unless (my $speciesname eq (my specieslist{$entry})) {
You don't blindly put my in front of every variable. It is a way to declare variables, so you only put it in front of the first use of a variable (and in a scope where every other use can 'see' it). First, 'specieslist' is a hash, so somewhere you would have 'my %specieslist;' or 'my %specieslist = ....;'. and so speciesname and specieslist in your clause above would not have a my.
And your clause above also has another typo, the lack of a '$' in front of specieslist (but I'm just assuming that's just a typo here from your error message). FYI, you are declaring a new lexical variable '$speciesname' above, which is only scoped (it only exists) in the 'unless' block, and it has an undefined value.