Take a look af Mail::Address, it is a parser that does what you describe. Graham.
On Sun, Mar 24, 2002 at 12:50:36PM -0600, Hari Bhaskaran wrote: > Hi, > > Modules Mail::RFC822::Address and RFC::RFC822::Address seems to > have taken the namespace which is probably better for a address > parser and not just a validator. I was hoping that one of these > would provide an interface to represent the RFC822 addresses > (split into host, user etc). For example, when the To/Cc/Bcc line > is fed to it, it creates a data structure with list of addresses in it, > probably each address being of type ::RFC822::Address which can be > traversed later. > > Can this new module Mail::RFC822::Address (which was submitted on > March 15, 2002) > http://www.xray.mpe.mpg.de/mailing-lists/modules/2002-03/msg00224.html > be named ::AddressValidate or CheckAddress or something > like that? so that it leaves the namespace open for something that > can represent the parsed addresses. > > My apologies if this was the wrong list for this mail > > -- > Hari Bhaskaran >