First draft of a tool to extract URLs from a text file

This commit is contained in:
Emmanuel Di Pretoro 2018-08-24 13:41:51 +02:00
parent 583c4aac0b
commit 637b4df401

14
extract_urls.pl Normal file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Regexp::Common 'URI';
use IO::All;
foreach my $filename (@ARGV) {
my $content = io->file($filename)->slurp;
while ( $content =~ m/($RE{URI}{HTTP})/g ) {
print $1, $/;
}
}