docs: TBD code: | sub str_word_count { my ( $string, $format ) = validate_pos( @_, STRING, { %{+NUMBER_RANGE( 0, 1 )}, default => 1, } ); if ( $format == 1 ) { my @words = $string =~ m/(\S+)/g; return @words; } else { my %words; while ( $string =~ m/(\S+)/g ) { $words{ $-[1] } = $1; } return %words; } }