in reply to a few basic questions

  1. Use the modulus operator (perlop).
  2. What about using one loop and putting the statements after each other. Pseudocode:
    open File1 open File2 while (condition) { if (read from File1) { do something } if (read from File2) { do something; } }
  3. Have you tried it? What does it do?

-- Hofmator