for starters the regex is invalid. the first closing parens comes too soon. try:
if ($EmailAddress =~ (/^\w+\@aol\.com$/i)){ tim > -----Original Message----- > From: Eric Peers [mailto:[EMAIL PROTECTED]] > Sent: Friday, March 15, 2002 1:45 PM > To: [EMAIL PROTECTED] > Subject: parsing a domain name out of an email address > > > I'm attempting to parse a domain name out of a email address with the > following code: > > my $EmailAddress = $to; > if ($EmailAddress =~ (/^\w+\@aol\.com)$/i){ > my $msg = "/www/docs/sips_mar02aol.txt"; > } else > my $msg = "/www/docs/sips_mar02.html"; > } > > > Being new to regular expressions I'm not at all certain why this does not > work. > > Thank you, > > Eric > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]