<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Cutting text strings</TITLE>
<META content="text/html; charset=windows-1255" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>HI,</FONT></DIV>
<DIV><FONT face=Arial size=2>The best way is use Mail::Address module from
MailTools package.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>my <FONT face=Arial size=2>$EMailAdress = "<A
href='mailto:yaron.golan@SeabridgeNetworks.com"'>yaron.golan@SeabridgeNetworks.com"</A>;</FONT> <BR><FONT
face=Arial size=2>my ( $useraddress ) = Mail::Address->parse( <FONT
face=Arial size=2>$EMailAdress</FONT> ); </FONT> <BR>my $user =
$useraddress->user();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Pinkhas Nisanov</FONT></DIV>
<DIV> </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A href="mailto:yaron.golan@SeabridgeNetworks.com"
title=yaron.golan@SeabridgeNetworks.com>Yaron Golan</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A href="mailto:'perl@perl.org.il'"
title=perl@perl.org.il>'perl@perl.org.il'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, February 07, 2002 7:09
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Perl] Cutting text
strings</DIV>
<DIV><BR></DIV>
<P><FONT face=Arial size=2>Hi all,</FONT> <BR><FONT face=Arial size=2>What is
the best way to take only the user name from an E-mail address?</FONT>
<BR><FONT face=Arial size=2>e.g.</FONT> <BR><FONT face=Arial
size=2> </FONT> <BR><FONT face=Arial size=2>$EMailAdress = "<A
href='mailto:yaron.golan@SeabridgeNetworks.com"'>yaron.golan@SeabridgeNetworks.com"</A>;</FONT>
<BR><FONT face=Arial size=2> </FONT> <BR><FONT face=Arial size=2>I need
only the "yaron.golan"</FONT> <BR><FONT face=Arial size=2> </FONT>
<BR><FONT face=Arial size=2>In tcsh I'd do something like : echo $EMailAdress
| tr '@' ' ' | awk {print $1}'</FONT> <BR><FONT face=Arial size=2>What is the
best way to "perl" it ?</FONT> <BR><FONT face=Arial size=2> </FONT>
<BR><FONT face=Arial size=2>Tia,</FONT> <BR><FONT face=Arial size=2>YG</FONT>
</P><BR>
<P><FONT
face="Times New Roman">---------------------------------------------------------------</FONT>
<BR><B><FONT color=#0000ff face=Script size=6>Yaron Golan</FONT></B>
<BR><B><FONT color=#0000ff face=Script size=6>Configuration
Management</FONT><I></I><I></I></B> <BR><FONT face="Monotype Corsiva"
size=7>SEABRIDGE</FONT> <BR><FONT face="Times New Roman">Tel: </FONT><FONT
face="Times New Roman" size=2>+972 9 7751179</FONT><FONT
face="Times New Roman"> </FONT><BR><FONT face="Times New Roman">Fax:
</FONT><FONT face="Times New Roman" size=2>+972 9 7751212</FONT>
<BR><FONT face="Times New Roman">E-mail: </FONT><FONT face="Times New Roman"
size=2>yaron.golan</FONT><FONT face="Times New Roman (Hebrew)"
size=2>@</FONT><FONT face="Times New Roman"
size=2>SeabridgeNetworks.com</FONT> </P><BR><BR></BLOCKQUOTE></BODY></HTML>