perl -ni.bak -e "print $_ if /\w/;" my_file.txt