Tag Archives: one-liner

Removing leading whitespace in file with perl.

Do you ever have code with such poor formatting that you just need to start over? This will let you remove all leading whitespace from every line in the file. I’ve found it handy every now and then. perl -i -pe’s/^\s+//’ file.c

Posted in Programming, Webhosting | Also tagged , | Leave a comment