#!/usr/bin/perl use strict; use warnings; my %nets; /^Net '([^']+)'/ and not $nets{$1}++ and print "$1\n" while ;