RE: mail header split

2005-05-31 Thread Ankur Gupta
From: John W. Krahn [mailto:[EMAIL PROTECTED] > Ankur Gupta wrote: > > > > You can use splice to capture only the relevant fields. > > change it to this... > > > > my ($bookrefNumber) = (split(/-/,$pop3MailContent{'To'}))[0]; > > You mean a list slice, splice() is a perl function. > > perldoc

Re: mail header split

2005-05-31 Thread John W. Krahn
Ankur Gupta wrote: You can use splice to capture only the relevant fields. change it to this... my ($bookrefNumber) = (split(/-/,$pop3MailContent{'To'}))[0]; You mean a list slice, splice() is a perl function. perldoc -f splice John -- use Perl; program fulfillment -- To unsubscribe, e-m

RE: mail header split

2005-05-31 Thread Ankur Gupta
> I have an email To field that I want regex on > > The email is as so: > > [EMAIL PROTECTED] > > Im trying to get the number before the hyphen. > > Currently I have it as so > > my ($bookrefNumber, $discard) = split('-',$pop3MailContent{'To'}); You don't need to use $discard variable. You c