in reply to Removing duplicates

Something like...

my %hash=(); while(<>) { if (/Net '(\w+)'/){$hash{$1} = 1;} } print "$_\n" for keys %hash;
...will get you through the first question.