This looks more complicated, but is essentially the same problem you ran
into before, with one extra step.  How do you get rid of what you don't want
so that you can add just the numbers.  If you look at each line, they all
start with:

some word characters
a colon
some space characters
a $

$_ =~ s/\^w+:\s+\$//; 

will remove the above, then you just have left what you started with in the
last question.

-----Original Message-----
From: Bruce Ambraal
To: [EMAIL PROTECTED]
Sent: 3/19/02 7:07 AM
Subject: Seach around word text - display totals only!



An input data file looks like this: (see below) 

Description:  financial amount
Shoes:         $110
Car:              $3,100
Rates:          $0,50

I want to add the total of amount.
Also want to add all the totals containing an "s" discription.

My problem is basically 
Searching arround the word text to display the total only.

Certainly I know how to go about adding  the totals.





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


--------------------------------------------------------------------------------
This email may contain confidential and privileged 
material for the sole use of the intended recipient. 
If you are not the intended recipient, please contact 
the sender and delete all copies.

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

Reply via email to