in reply to Text merge concept in perl
If you get stuck with a particular point of your code, do ask again.
EDIT: of particular use might by readdir, open, and perlsyn.