in reply to File opening, based on a regex...

I think you want to do ...
open (FILE, ">>$_");
... and don't forget to chomp ...
while(<>) { chomp;

Plankton: 1% Evil, 99% Hot Gas.