[Perl] Cutting text strings

Gaal Yahas gaal at forum2.org
Thu Feb 7 13:52:29 PST 2002

On Thu, Feb 07, 2002 at 11:42:44PM +0200, Pinkhas Nisanov wrote:
> The best way is use Mail::Address module from MailTools package.
> my $EMailAdress = "yaron.golan at SeabridgeNetworks.com"; 
> my ( $useraddress ) = Mail::Address->parse( $EMailAdress );  
> my $user = $useraddress->user();

How is this better than a simple s///?

It is slower, requires a package that isn't in the standard Perl
distribution, and is less reliable. The functionality, however,
isn't better than an s/// in any way. Why the bloat then?

Gaal Yahas <gaal at forum2.org>

More information about the Perl mailing list