in reply to Tricky Syslog Parsing

If you want the "unique somethings", use a hash. Here you key off of the message ID and store the line of text as the value.

Code, untested --

my %messages; while(<FILE>) { /(FW\-\d+\-\d+)/; # extract MSG ID next if exists($messages{$1}; # ignore it if we've $messages{$1} = $1; # alreaqdy seen it. }

%messages has the first occurance of each message

----
I Go Back to Sleep, Now.

OGB