Even notionally simple perl code pattern matching tasks like "find the comments" are made difficult by the nature of perl:

Adam Kennedy's PPI is a module which attempts to solve the problem 'enough' to get a bunch of perl document parsing jobs done.

BradsWiki: Programming Notes/PerlProgramming/ParsingPerlWithoutRunningIt (last edited 2014-04-11 05:50:30 by BradleyDean)