+ return $count;
+}
+
+sub append
+{
+ my $suffix = shift;
+ my @in = @_;
+ my @out;
+
+ if ($suffix) {
+ my $fn = _fn() . ".$suffix";
+ my $r = rand;
+ my $fh = IO::File->new (">>$fn.$r");
+ if ($fh) {
+ print $fh "$_\n" for @in;
+ $fh->close;
+ move "$fn.$r", $fn;
+ } else {
+ LogDbg('err', "DXCIDR::append error appending to $fn.$r $!");
+ }
+ } else {
+ LogDbg('err', "DXCIDR::append require badip suffix");
+ }
+ return scalar @in;