Thanks for the help, everyone. I am currently reading about how to turn my friendoffriend.pl script into a module. I want to keep this script as a separate file, rather than making it a subroutine within the calling program, so that I can use frinedoffriend.pl on its own. If anyone know of a good tutorial for converting perl scripts in a module, please let me know.
In regards to the query:
friendoffriend.pl is used to cluster data in the AllJoinRecip table, so given an input $seq, friendoffriend.pl finds all of the other "nodes" that $seq can reach, either directly or indirectly. So once I've run the script on seqA and found that seqA, seqB, and seqC are all in a cluster, then I do not need or want to run the script on seqB and seqC. I want to find a cluster for each seq in AllJoinRecip, without duplicating clusters, where AllJoinRecip contains a bunch of one to one links. Does this description make sense? If anyone can think of other ways to do this, I would like to hear them.
Comment on Re: Efficiency of a Hash with 1 Million Entries
Instead of trying to keep it as a script, make it a module and make the script a small wrapper around the module. Then you can use the same code from many places.