my $req = HTTP::Request->new(GET => $link) or die $!;
my $res = $ua->request($req);
my $html = $res->content;
# write_file() comes from File::Slurp
# $item_id is the article ID extracted from
write_file($item_id, {binmode => ':raw' }, $html);
# Original source string looks like:
# John Smith
my ($other, $author) = $html =~ /\?author=(.*?)">(.*)<\/a>/;
# $author is blank, empty here, why?
print "AUTHOR: $author\n";
my $new_html = read_file($item_id);
my ($n_other, $n_author) = $new_html =~ /\?author=(.*?)">(.*)<\/a>/;
# Now $author contains the right name, "Mike Smith" for
# example.
print "AUTHOR: $n_author\n";