for my $line (split /\R/, $contents) { print {$fh} "add list=blacklist...\n" if /^[0-9]{1,3}\./; }