in reply to Removing duplicate hashrefs from an array
HASH ~~ ARRAY : any ARRAY elements exist as HASH keys (like: grep { exists HASH->{$_} } ARRAY)
Update: If you want to get unique nodes and ports, use a hash of hashes:
$href->{$node}{$port} = 1; [download]