Have you looked at Perltidy? It can do a lot of source code reformatting, and if it doesn't do what you want, it should at least be a good starting point for modification.
Comment on Re: Cleaning Whitespace from Source Code
Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.