in reply to Merging files

Sort::Merge maybe? (Where you need to have the files already sorted, and it merges the contents into one output).. But you'll still need a filehandle for each file.

I'm not sure I understand the "open file handles dynamically" question.. Isn't it always dynamic? If you want to open a list of files, just run in a loop:

foreach my $file (@files) { my $fh; open $fh, "<", $file or die "Can't open $file ($!)"; push @filehandles, $fh; }
C.