# You can create a database handle using DBI:
use DBI;
my $dbh = DBI->connect("DBI:mysql:database=mydatabasename;host=mydatabaseserver", "databaseusername", "databasepassword");
# then you do inserts like this:
$dbh->do(qq(INSERT INTO tablename VALUES(a,b,c)));
#...
You can do it pretty quickly by hand too. Something like:
#!/usr/local/bin/perl
use LWP::Simple;
use strict;
my $content = &get("http://my.address.com/webpage.html");
my @urls = $content =~ /href="(.*?)"/smig;
print join("\n", @urls), "\n";
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.