http://www.perlmonks.org?node_id=998059


in reply to Re^2: Speed up perl code
in thread Speed up perl code

Yes, it is spending much time in that loop, because 90% of your code is there.

You need to divide your code into subroutines, preferably small ones, to get a reasonable analysis from a profiler.