use strict; use warnings; $_ = 'here the text goes'; my @entries; print scalar (@entries = split /\s+/, $_); #### use strict; use warnings; $_ = 'here the text goes'; my $count; print $count = $_ =~ s/\S+//g;