in reply to
Select only desired features from a text
I'm getting the impression, the same question, with similar data, is asked every few days here. The only thing that seems to be changing is the name of the animal.
Given the size of the file, and the fact it seems you need to do this over and over again, I'd say take a 2-day basic SQL course, load your data in a database, and run some SQL queries.
Considering how you're struggling with Perl, the 2 day investment should pay itself of in about 2.1 days!