I have a 1MB file. I need to take only emails from this file.
Perl ver. of my sript is
open(FILE,"from") or print "from.txt error";
open(FILETO,">>emails.txt") or print "emails.txt error";
while (<FILE>) {
if (/(\S+)@(\S+)/i) {print FILETO "$1@$2\n"; } }
close(FILE);
close(FILETO);
How to make this on PHP.
Help me please,
Vladimir