$ echo roygbiv | perl -e '$a=;chomp $a;printf "There are %d colors in the rainbow.\n",length $a'