in reply to Removing duplicate hashrefs from an array

The smartmatch table in perlop explains what ~~ does for a HASH and 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;
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ