remove spaces in a file

Here's another one from my colleague, engineer Gary Utz. With this one-liner you can strip all the blank lines out of a file. Very useful.
perl -pi -e 's/^(\s)*$//'