Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl -w
    
    ...
      close $fh or die "Error closing $file: $!\n";
      return +{ map +( $_ => 1 ), @words };
    }
    
  2. or download this
        @count = split(//, $word);  ### why split before removing \W ???
        $word=~s/\W//g;
    
        next if @count < 4;  ### short circuit (keep nesting down); don't
                             ### need scalar
    
  3. or download this
        $word =~ s/\W+//g;
        next if length $word < 4;