What I am trying to do is get a total of line that 
matches a specific criteria and when it stops matching 
return the total to variable. If I have the following 
files:
file1:                           file2:
$line[1] =                          $field[0] 
AR                                  AR  
AR                                  ACCT
AR
ACCT
ACCT
ACCT
ACCT 

and use the following:
                if ($line[1] = (/^:$field[0]/)) {
                 $total = $count++;}

I want $total for AR to = 3 and $total for ACCT = 4.

When I run it I get
1
2
3
3
3
3
3
1
2
3
4
4
4
4
4
4 etc...

Any thoughts

Thanks 
 

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

Reply via email to