Help for this page
while (<>) { $l = $_; ... delete $pairs{$l[1]}; # not sure it's needed, + since you just reuse the same variable in the next iteration } }