Well, you could scan over the file with a regex:
use strict; use warnings; open F, 'file' or die $!; undef $\; # Enable slurp mode $_ = <F>; close F; print "$1\n" while /([\w.-]+\@[\w.-]+)/g;
But there are many ways to do this.
Update:Fixed my most glaring use strings; error. -- Ted, sitting here with egg on his face! :-)
Ted Young
($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)In reply to Re: extract email addresses
by TedYoung
in thread extract email addresses
by johnajb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |