First draft of a tool to extract URLs from a text file
This commit is contained in:
parent
583c4aac0b
commit
637b4df401
14
extract_urls.pl
Normal file
14
extract_urls.pl
Normal 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, $/;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user