Help for this page

Select Code to Download


  1. or download this
    my %words;
    ++$words{$_} for /\w+/g;
    ...
       next if @$_ != grep $words{$_}, @$_;
       print("matched @$_\n");
    }
    
  2. or download this
    my %next_words;
    $next_words{$1} = $2;
    ...
       next if @$_ != grep defined($next_words{$_}), @$_;
       print(join(' ', map "$_ $next_words{$_}", @$_), "\n");
    }