#!/usr/bin/perl -w # Remove dlib urls that aren't article urls use strict; open(URLS, "url_id_list.txt") || die($!); while (my $line = ) { next if ($line =~ m|^\d+\.\d+\.\d+ http://www.dlib.org| || $line =~ m|\d+\.\d+\.\d+ http://dx.doi.org/10.1045/|); print $line; } close URLS;