#!/usr/bin/perl -w use strict; my %message_id; while ( <DATA> ) { if ( /Email address:/ ) { print; } elsif ( /Message-Id:/ && ! $message_id{ $_ }++ ) { print; } } __DATA__ Email address: 19324213@glerp Message-Id: <200103160515.WAA07878@mal.elp.rr.com> Message-Id: <200103160515.WAA07878@mal.elp.rr.com> Email address: 19075680@glerp Message-Id: <200103150512.VAA27508@prxy3.ba.best.com> Message-Id: <200103150512.VAA27508@prxy3.ba.best.com>
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to (Ovid - remove duplicates) Re: Seeing double
by Ovid
in thread Seeing double
by amearse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |