Extracting the content (cont) 

my $insert_art = $dbh->prepare('INSERT INTO articles ...');

foreach my $link (@art_links) {
    $ua->get($link);

    my($form) = grep { $_->find_input('status'); } $ua->forms;
    #warn $form->dump;

    my %article = (
        article_id       => $form->value('id'),
        title            => $form->value('name')      || '',
        category_id      => $form->value('cat')       || undef,
        author           => $form->value('spare1')    || '',
        placement        => $form->value('spare2')    || '',
        keywords         => $form->value('spare5')    || '',
        summary          => $form->value('spare9')    || '',
        content          => $form->value('content')   || '',
        content_url      => $form->value('link')      || '',
    );
    # fixups for encodings, date formats, URL/filenames etc

    $insert_art->execute(@article{@article_cols});
}