http://www.perlmonks.org?node_id=268492


in reply to Perlify some awk'ing for SPAM graphing

perl -ane 'chomp @F; print "$F[1] $F[0]\n"' spamstatfile

update: oops, you wanted edit in place, not to stdout:

perl  -i.bak -ane  'chomp @F; print "$F[1] $F[0]\n"'  spamstatfile

--Bob Niederman, http://bob-n.com