in reply to perl prog to read a sentence and print the count of chars for each word
$ perl -le' my $input = "I am new to perl"; while ( $input =~ /\S+/g ) { print $+[0] - $-[0]; } ' 1 2 3 2 4 [download]