in reply to
Need help to fine tune perl script to make it faster( currently taking more than 30 minutes)
Well, use some combinations while you are fresh and new better than playing along into each mess you make with this code. Watch this, You are opening a file like there is butter "no problems"; then do not use "if" is for causing lots of funs but this does mess you up this moment. Instead use a While (<IN>) loop and use a "chomp" command assigned it to a variable "X" basically, you will remove any issues or string of hand to keep it on buffer just in case. Use File:Find library and make an array until satisfy. Finally go back and create or copy a file into a new one with new results. I'll see that you use new commands so you will get excited when you use perl next time. If you have not started yet, begin writng code slowly. And if you need me to write it for you; need to know file name and variable names. Love Perl as much as I do.