I'm kinda brand new to perl (well programming in general), and have been presented with a perl script (Id_script3.pl). The script requires a modification, in which 'SpeciesId3.txt' will be used instead of the 'SpeciesId.txt' which is currently used by the script.

There is a slight difference between the two files, so a slight modification would need to be made to the script for it to function; the difference being that SpeciesId3.txt contains no letters (A =, B =, C =) and simply a (much) longer list of values as compared to the original 'SpeciesId.txt'.

I've tried a couple of attempted "work-arounds" but am yet to discover one that works.

Your existing script very much depends on the 'letters'. You need a scheme to infer them from the new data. If this is not possible, I doubt that the existing script is going to be much help at all in processing the new data. Please try to describe both the old and new data in terms that programmers (not biologists) can understand. Good Luck, Bill

Well, I don't really have the time now to look into it and look at your various file to really understand the details of what you want to do.

Two points.

1. As mentioned by others, your current script relies heavily on the current structure of your file, most of it will be unusable with the new data.

2. Closures are a nice features of Perl, pretty useful, but they are a somewhat advanced topic. And as far as I can say from reading quickly your program, it is not extremely useful in the case in point and it might give headaches to a beginner. I would simply make %species a global variable in this case.

Removing the closure feature is very easy, but changing the program to adapt to the new data format is slightly more complicated, because you need first to understand the format and figure out what to extract. I don't have time for that right now (probably not before the weekend).