Help for this page

Select Code to Download


  1. or download this
      my $word_count = int(split(' ', $string));
    
  2. or download this
      my $word_count = scalar(my @words = split(' ', $string));
    
  3. or download this
      $string =~ s/(\s+)/$1/g;