As others noted, this problem isn't nearly as simple as it first appears. To be safe, use Mail::Address instead of trying to create your own solution:
use Mail::Address; my $addr = 'name@domain.com'; my $ma = Mail::Address->new('', $addr); my $user = $ma->user;
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
In reply to Re: email regex
by hardburn
in thread email regex
by bodmin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |