in reply to Running two loops

I'm not really sure what you're trying to do, but I see one obvious problem - you're opening INTER in write mode and then trying to read from it.

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg