#!/usr/local/bin/perl $from = $ARGV[0]; $to = $ARGV[1]; &sort_net_list($from, "/tmp/$from.$$"); &sort_net_list($to, "/tmp/$to.$$"); system "diff -b /tmp/$from.$$ /tmp/$to.$$"; unlink "/tmp/$from.$$"; unlink "/tmp/$to.$$"; exit; sub sort_net_list { local ($from, $to) = (@_); local ($list) = 0; local (@list) = (); open(F, "$from"); open(T, ">$to"); while () { next if (/^!/); if (/^access-list/) { if (! $list) { $list = 1; @list = (); } push(@list, $_); } else { if ($list) { $list = 0; print T sort @list; } print T; } } close F; close T; }