in reply to Search and replace

This should work with some modifications to better suit your purposes:
while ( <DATA> ) { print unless m/##(\d+)## \1/; } __DATA__ REG-NZL-PUB.1981-263 ##1981## 19810922 REG-NZL-PUB.1981-263 ##1981## 19820922 REG-NZL-PUB.1981-263 ##1981## 19830922 REG-NZL-PUB.1981-263 ##1981## 19840922 REG-NZL-PUB.1981-263 ##1982## 19810922 REG-NZL-PUB.1981-263 ##1983## 19810922 REG-NZL-PUB.1981-263 ##1984## 19810922 REG-NZL-PUB.1981-263 ##1985## 19850922
Resulting in:
REG-NZL-PUB.1981-263 ##1981## 19820922 REG-NZL-PUB.1981-263 ##1981## 19830922 REG-NZL-PUB.1981-263 ##1981## 19840922 REG-NZL-PUB.1981-263 ##1982## 19810922 REG-NZL-PUB.1981-263 ##1983## 19810922 REG-NZL-PUB.1981-263 ##1984## 19810922

Note that I am assuming that the patterns of the lines in question are all the same.

-enlil