in reply to Further question on removing elements from arrays
You can use grep.
Now @a and @b should be equal, containing only the common elements.my (%a, %b); @a{@a} = (); @b{@b} = (); @a = grep {exists $b{$_}} @a; @b = grep {exists $a{$_}} @b;
Added - fixed missing curlies, tlm++.
After Compline,
Zaxo
|
|---|