in reply to Simple PDL question: set intersection

I don't know of a direct set intersection operator on the values of a pdl. For your example, you can use conditionals to effect the same result:
use PDL; my $arr = pdl 10..20;; print $arr, "\n"; my $idx = which( $arr>14 & $arr<19 ); print $idx, "\n"; my $subset = $arr->index( $idx); print $subset, "\n";
prints
[10 11 12 13 14 15 16 17 18 19 20] [5 6 7 8] [15 16 17 18]
If you need real set intersection and not just subranges, converting to hashes may be the easiest apporach.

-Mark