Help for this page

Select Code to Download


  1. or download this
        my @ary1 = (1, 2, 3, 4, 5, 6, 7);
        my @ary2 = (6, 7, 8, 9, 10, 11);
    
    ...
        print "ary1 is @ary1 \n";
        print "ary2 is @ary2 \n";
        print "dupes were @dupes \n";
    
  2. or download this
        @dupes = grep {    exists $h2{$_}} @ary1;
        @ary1  = grep {not exists $h2{$_}} @ary1;
        @ary2  = grep {not exists $h1{$_}} @ary2;