I’m searching a string for all valid e-mail addresses ending in @enron.com.
My assignment is the following line:
my $enronAddress =~/^(.+?)@\@enron\.com/i;
This isn’t making any assignments, so I’m wondering what I’ve done wrong here.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you looking for all valid addresses within the string, or checking that the complete string is a valid address? I don’t understand what you mean by “This isn’t making any assignments” as all you have written is a regex pattern match
First of all you have two
@signs in your pattern, which is clearly wrongA lot depends on what you consider to be a valid email address, but for a start this will check whether the contents of
$enronAddressis a valid addressand this will print all valid addresses that appear in
$enronAddress