#!/usr/bin/perl -w use strict; # # Usage: # fixdns infile > outfile # # Usage for in place editing: # perl -i fixdns dnsfile # while (<>) { # is the line an MX record? if (/^@.*mail(\d+)/xms) { # is it less than or equal to 8? if ($1 <= 8) { print; } } # print everything else to the new file else { print; } }