in reply to Counting overlapping dimers for multiple sequences

By assigning a file handle to a scalar you are only reading one line from it. To solve the problem you just need to put your code in a loop.

Code snippet below should give you some idea

while (my $genome= <FH>) { for (0..length($genome)-2) { my $dimer = substr($genome, $_, 2); $dimers[$idx]{$dimer}++ ; #seq wise length of dimer } $idx++; }
Update: Fixed typo. Anyhow post seems similar to of flexvault :)
Regards,
Ashish