Steve wrote:
> 
> From what I have read from The Camel $1 should contain the matched text.
> From that matched text I want to then search for an additional string.

$1 contains the text matched in the first set of parentheses.


> I have this in a file:
> 
> Connect time 8.3 minutes
> Connect time 100.1 minutes
> (etc)
> $line gets the whole line and from there I wanna place the numerical time
> into a variable, so that 8.3 would be placed into $sum and then 100.1 added
> into it so the total would eventually be in $sum.


if ( $line =~ /Connect time ([\d.]+) minutes/ ) {
    print "$1\n";
    $sum += $1;
    }



John
-- 
use Perl;
program
fulfillment

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

Reply via email to