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


in reply to New to Perl

Two One things catches my eye straight away.... One final issue you should use strict and use warnings to catch typos and to ensure you have scoped your variables

Update corrected my half asleep error, too little testing of code and coffee

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."

Replies are listed 'Best First'.
Re^2: New to Perl
by chromatic (Archbishop) on Aug 04, 2011 at 05:32 UTC
    To define %hash you need to map {$hash{$_}=1}@file_data

    Did the querent update the OP? This works just fine (and is less abusive):

    my %hash = map { $_ => 1 } @file_data;
      The $query is suppose to be the key for the hash which will be the the ID from the FASTA sequence

        Is the solution as simple as using chomp on the lines of your array?