in reply to Re^2: tips on how to speed up a very slow perl script requested
in thread tips on how to speed up a very slow perl script requested

Here is what you need to do:
  1. Declare a hash
  2. Read the first file line by line, populating the hash
  3. iterate over the second file, and look up the values in the hash

In your current program, you compare things to $pdbchain, so your hash keys have to be constructed exactly in the same way as $pdbchain

Give it a try, and when you have problems, come back with more specific questions.