Don't ask to ask, just ask | |
PerlMonks |
Re: Cleaning Whitespace from Source Codeby davido (Cardinal) |
on Dec 08, 2004 at 22:35 UTC ( [id://413358]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|