When I send mail to a certain address, the mail gets piped to my perl script. I'm then using Mail::Internet to extract info, including the From header. For me, the header looks like this Pete Emerson <[EMAIL PROTECTED]>
1. I assume that they're all going to look different. Is that correct? 2. Is an email always going to be enclosed by <>? (If the answer is yes, I'm home free.) 3. If not, is there a tool to help me extract the email address? 4. If I'm stuck trying to parse it out myself, is this a good way to do it? Assuming the chomped From header is stored in $email ..... $email=~s/^.*?([-\w\.]+@[-\w\.]+\.[A-Za-z]{2,4}).*?$/$1/; This works on my email address in the format given above. Thanks. Pete -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]