$ perl -le' my $input = "I am new to perl"; while ( $input =~ /\S+/g ) { print $+[0] - $-[0]; } ' 1 2 3 2 4
In reply to Re: perl prog to read a sentence and print the count of chars for each word
by jwkrahn
in thread perl prog to read a sentence and print the count of chars for each word
by anita14
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |