Hi -

use strict;

my $data = "Received 921MB 16764 3955 375  2.2%   1296  7.7%";
@_ = $data =~ /\b(\d+)\b/g;
print "$_\n" for (@_);  # prints 16764 3955 375 2 2 1296 7 7
print "$_[2]\n";                # prints your guy: 375

Throw the "global" (g) on the RegEx and get the results into an array...

Aloha - Beau.

-----Original Message-----
From: Stuart Clark [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 18, 2002 1:48 AM
To: Perl List
Subject: newbie question


Hi again,

Thanks john for helping me with this solution to get the 16764 out of
the $data string

($recievedmail) = $data =~ /\b(\d+)\b/;

I have another question 

How would I pick out the 375 in the same string

$data = "Received 921MB 16764 3955 375  2.2%   1296  7.7%";






-- 
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