Help for this page

Select Code to Download


  1. or download this
    @array1 = [ "test", "test2", "test2", "test3", "test4", "test4" ];
    @array2 = [ "test", "test", "test2.1", "test4.1", "test4.2", "test4.3"
    + ];
    
  2. or download this
    foreach my $item (sort @array1) {
      foreach my $found (@array2) {
    ...
      # BUT this must only match in "one direction": test4 matches test 4.
    +1, but test4.1 doesnt match test4
      return 1 if ($x =~ /some_regex_on_$y/);
    }
    
  3. or download this
    @save contains [ "test", "test2", "test4", "test4" ];