Hi Chris,
> It is detecting but not testing if any particular 2 words are in a
> text field and I think that's what you explained you were testing for.
Sorry if my first post was misleading. Those were just some examples.
I'm looking only for an occurrence of _any_ two words in that list, not a
particular combination. Though the most common combo is a PO Box and a street
address.
> You can say: if (/box/i && /street/i) {
> rather than the more complex: if ($str =~ /box/i && $str =~ /street/i)
> my $address_count = () = $str =~ /box|street|avenue|lane|apo/ig;
Thanks for the tips!
Marc
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/