in reply to Removing leading whitespace from a file?
Does perl -p -i.bak -e "s/^\s+//g" filename not do it (also giving a backup file named filename.bak)?