Help for this page
use strict; use warnings; ... ++$count; } ++$count if ($input =~ /./); # catch the last word
my @array = split /\s+/, $input; $count = scalar (@array);