PM is about helping you learn; not about spoon-feeding you, nor about do-it-for-you. So read carefully even replies that (in your limited knowledge, maybe) seem not "really informative and helpful."
In this case, the reply in question seems to me (duh!) both informative and helpful (unless the level of your knowledge is such that you need not have asked the original question). So even if you choose not to profile your code to find out where it's taking a lot of time, you would be well-served to consider the comment about the loops (nested loops are INEFFICIENT in your problem case) and to follow up on the observation about your regexen. If you take just a little time to study perldoc perlretut and or comparable documents, you'll learn how to write one that's not reliant on the death_star ... eg, .*, even when restricted by the minimal modifier... e.g., ?.
| [reply] [d/l] [select] |