$ perl -e'$foo="this is a test!";print join "-", split " ", $foo' this-is-a-test!