sub getSeqfromfasta2lmers { my $file = shift; ## Use a lexical file handle so thaty the file is closed automatically open my fh, "<$file" or die "$0: Can't open file $file: $!"; my $in = Bio::SeqIO->newFH( -format => 'fasta', -fh => $fh ); return <$in>; ### MUST BE CALLED IN A LIST CONTEXT!!!! }