in reply to efficiently printing to 30 files

One major thing you could do is put those repeated bits of code into subroutines. Check out perldoc perlsub for more information.

But I see that there have been a lot of answers in the last few minutes, all better than mine. Maybe I can learn from this experience?

--
Allolex