Brian Shallenberger <bri...@cleareagle.com> wrote:

Is there a way to parse the part of the Sender's email address that
precedes the '@' character so I can build a recipient's email address?
For example:

Sender email address:  j...@abc.com

There is of course "more than one way to do it", but here's one:

my ($localpart,$domainpart) = split('@',$Sender);

Then $local is 'Joe' and $domain is 'abc.com'.

The 'my' localizes the variables to the routine that's using them.  Read
about scope in perl.  You must make sure the variables are cleared before
the next message is processed, either by scoping or by defining them to
be null before you assign to them.

Joseph Brennan
Columbia University Information Technology

_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to