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


in reply to Visualizing the skeleton of a perl code

By the blue-coded structure I presume you are referring to a part of the perl syntax that your editor is colouring blue. Seeing as I don't know what editor you are using, or how you have configured it, I don't know what sort of syntax you are referring to.

I have found in the past that if I want to understand the flow of a large perl script that I have not seen before, a good way is often to to run it under the Devel::NYTProf profiler. The report it generates will contain loads of performance information which you can ignore for now, but it will also tell you for each function what other functions called it, and how often, so by reading the report you can get an idea about the flow of the program, and which parts are important, you can also get a clue where the dead code is, as it will not have any calls to it. (Though make sure you allow for error handling code before you remove anything.)