Help for this page

Select Code to Download


  1. or download this
    my @array1 = (1, 3, 4, 6);
    my @array2 = (1, 2, 4, 6);
    ...
    @union = grep { not $seen{$_}++ } (@union, @array3);
    
    print join(' ', @union);
    
  2. or download this
    @array1 = (1, 2, 3, 4);
    @array2 = (1, 3, 2, 4);