I have a file with single field like so;

```
scaffold10017|size24957-5236
scaffold10017|size24957-5236
scaffold10017|size24957-5236
scaffold10017|size24957-7124
scaffold10076|size19532-3212
scaffold10076|size19532-6287
scaffold1008|size40169-12384
scaffold1008|size40169-12399
scaffold1008|size40169-21350
scaffold1008|size40169-34740

```

I want to print a new file that includes this field and a second field with values that increment by a value (say 100,000) every time a record does not match the previous record in field. So the output would look like this:

```
scaffold10017|size24957-5236 0
scaffold10017|size24957-5236 0
scaffold10017|size24957-5236 0
scaffold10017|size24957-7124 0
scaffold10076|size19532-3212 100000
scaffold10076|size19532-6287 100000
scaffold1008|size40169-12384 200000
scaffold1008|size40169-12399 200000
scaffold1008|size40169-21350 200000
scaffold1008|size40169-34740 200000

```

Would be grateful if anyone can suggest how to do this.