perl - extracts valid dna from corrupted file