in reply to Re: Parsing a csv file from Exchange
in thread Parsing a csv file from Exchange

No need for the while loop and push, and you want to drop the last % sign in case the field in question is the last one:
my @emails = $email_field =~ m/SMTP:([^\%]+)/g;
Note to cajun: you do know about the Text::CSV CPAN modules, correct?

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: (jeffa) 2Re: Parsing a csv file from Exchange
by cajun (Chaplain) on May 21, 2002 at 06:28 UTC
    Thanks to all. This works fine as long as SMTP is the first address listed in $email_field. Unfortunately Bill doesn't always put SMTP first. (see my example above). If anything other than SMTP is first, this breaks.