[Gllug] strip invalid email addresses

Dave Cross dave at dave.org.uk
Sat Dec 8 08:50:35 UTC 2007


Matthew King wrote:

> Perl, of course, is always an option:
> 
> perl -e 'open LIST, "<list.txt"; @list = <LIST>; close LIST; @email =
> grep (/\@/, @list); print foreach @email'

I think you mean

perl -ne 'print if /@/' list.txt

Perl programmers are supposed to hate excessive typing :)

Dave...
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list