It seems at least some of your questions are more domain-specific than language-specific. That is, your OAuth2 knowledge could use a boost here as much or more than your Perl knowledge.
A redirect_uri is the URI which you've registered at the authenticator as where you want users brought back to your site after they authenticate. If you've registered with Yahoo! for their users to be authenticated to your application, this is the URI on your site you providedf to them.
https://aaronparecki.com/oauth-2-simplified/ has a good introduction to what can be some confusing terminology. Understanding OAuth2 (or OpenID Connect, or SAML2) on some level is important to choosing the right authentication method and using it appropriately. You won't need to be an expert or need to be able to rewrite the client libraries yourself, but this is something you can't cobble together without understanding a bit about the functioning of the standards from the points of view of the protocol client (which tends to be a web server) and the end-user's client (their browser).