Well, I'm building an architecture where Perl is supposed to handle 301:s and 404:s, opposed to handling "everything" via .htaccess (I don't like to write .htaccess dynamically)
But maybe .htaccess is the only way to go? I know it's not Perl related but...Maybe RewriteMap is a possible solution?