Thank you for your quick replay. I cannot use the option to concatenate files as I want to sort the content of all files, one by one, and place the new files (with the same name) to the new folder. This is important because of other steps in my procedure.
Therefore I need to first read the content of all files an then sort them. When you say moving some of the code out of
, which part excatly are you refering to? I am sorry for the additional question, but I am a newbe in Perl and I still find it hard to understand the syntax.
Thanks!