----- Original Message ----- From: "Marc Morrison" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> > I have a text file which contains much un-needed data, > but also contains a bunch of email addresses I need. > I have been succesful in the basics of opening the > file and putting the contents into an array. > > However, I have had a problem extracting the email > addresses.
Assuming a line of text contain max. of an email address, the following should help; open FILE, 'data.txt' or die "$!\n"; while (<FILE>){ print "$1\n" if /([^ ]+@[^ ]+)/; }; close FILE; _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]