in reply to Cleaning Whitespace from Source Code

It's not specifically related to just whitespace, but have you looked at Perl::Tidy? It will beautify and format your code for you.

Cleaning up whitespace in Perl code just with regexps is problematic since Perl's code can include both nonessential whitespace, and essential whitespace. For example, unless you're using a real parser, it's difficult to tell the difference between a HERE doc (which presumably has significant whitespace) and code (which presumably has some insignificant whitespace).


Dave

  • Comment on Re: Cleaning Whitespace from Source Code