See our Smart Differencer for tools that compare programming langauge files according to structure rather than lines of text. Thus, spaces (including linear ones if they are spaces in your language), including comments, are ignored.
These tools work by analyzing the source code to determine its structure.
There are SmartDifferencers for C and C ++. Not for Perl. Perl is hard to parse: -}
source share