BigGer has asked for the wisdom of the Perl Monks concerning the following question:

Hi Oh Wise Ones, I am looking for some perls of wisdom. I am searching a log file for email addresses ending in The code I am using is giving me duplicates so I get printed to the output file 10 times. What I am trying to do is output each email address only once. My Code is :-

open(LOGFILE, "logs") or die("Oh Magoo !!! You've done it again."); my @entries = <LOGFILE>; close LOGFILE; open (FH, ">> log_report.txt") or die("Oh Magoo !!! You've done it aga +in."); # Purpose Print all email addresses ended with $i = 0; while ($i != @entries) { while ($entries[$i] =~ /([A-Za-z0-9._-]+\ { print FH $1 . "\n"; } $i++; }
Thanks in advance for you help. G