#!/usr/local/bin/perl while ( <> ) { /[\s\<]?([\w.-]+@[\w.-]+)[\s\>]?/ && !$seen{$1} && ( print $1,"\n" ) && ( $seen{$1} = 1 ) ; # "\n" ; } # by DJCM 991206. Searches for email addresses in text files. # Only reports each found address once. #