im using perl and trying to calculate a certain column.
this is what the txt file looks like
1 200 OP
2 250 ED
3 270 OP

i want to find the first OP and save the number that matches it. In this case its 200.Then, it looks for the next OP and gets that number,which is 270. When the second OP is found, I want to sbtract 270 from 200.
im a perl beginner.
can anybody help me