I want to know the reason why cpu usage is 100%. how to make a execution more fast without consuming 100% cpu. or maybe i have doing something wrong that can i avoided have you u seen my sudo code ?
Since you haven't shown the actual code you're running (or any input data), or at least a representative sample (SSCCE), we unfortunately can't tell you why your code is running "slow" (Update: there might not even be a way to significantly speed it up without different hardware). For now, we can just tell you how to measure it yourself (e.g. Devel::NYTProf). There could be things you're doing in code that you haven't shown here that are slowing it down (for example, you didn't show the code you use to split the @lines array into chunks, except that you might be using string concatenation, and you haven't explained why you've got a @lines array in the first place, instead of a while(<$filehandle>) loop).