#!/usr/strawberry/perl/bin print ("Enter a sentence \n"); $count = 1; $str = ; chop ($str); @array = split (' ', $str); while ($count <= @array){ $word = $array [$count - 1]; $lengthWord = length($word); print (" ", $lengthWord); $count++; } #### 1 2 3 2 4