Thanks Chaley. I was eyeing the switch function, but thought perhaps I'm just doing something wrong with first_matching_cmp.
I found that I had to strcat the default.
Code:
program:
default = strcat("https://en.wikipedia.org/w/index.php?search=", field('author'));
ao3 = "http://archiveofourown.org/works/search?work_search[creator]={author}";
ffnet = "https://www.fanfiction.net/search.php?keywords={author}&ready=1&type=writer";
author_lookup =
switch(
field('publisher'),
'^archiveofourown.org$',
ao3,
'^fanfiction.net$',
ffnet,
default
);
I'll continue to play around with GPM. Now that I've started, I'm trying to find things to do.