You may need

> 
> $string =~ /\s+(\S+)\s+/;
>

if you could have mnore than one whitespace character delimiting the field.

Rob


> -----Original Message-----
> From: John Edwards [mailto:[EMAIL PROTECTED]]
> Sent: 07 September 2001 09:20
> To: 'Thaddeus Robertson'; [EMAIL PROTECTED]
> Subject: RE: String operation
> 
> 
> $string = "+OK 12 76912";
> 
> $string =~ /\s+(.*)\s+/;
> 
> $lastonserver = $1;
> 
> -----Original Message-----
> From: Thaddeus Robertson [mailto:[EMAIL PROTECTED]]
> Sent: 07 September 2001 09:15
> To: [EMAIL PROTECTED]
> Subject: String operation
> 
> 
> Hi
> 
> Here is a total newbie question:
> 
> I want to stick the second part of this string:
> 
> +OK 12 76912
> 
> into the variable $lastonserver so that $lastonserver = 12
> 
> I am using MacPerl 5.
> 
> TIA
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> --------------------------Confidentiality--------------------------.
> This E-mail is confidential.  It should not be read, copied, disclosed or
> used by any person other than the intended recipient.  Unauthorised use,
> disclosure or copying by whatever medium is strictly prohibited and may be
> unlawful.  If you have received this E-mail in error please contact the
> sender immediately and delete the E-mail from your system.
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to