My Fedora Core 7 box recently ended up in some state where my perl installation was seriously messed up. I'd get errors about mismatch in platform architecture, problems with sockets etc. etc. So, I really wanted to have yum reinstall all my perl packages. I couldn't find a way to do that, but I managed to achieve something similar using various commands. Here are the steps I followed:
# rpm -qa --qf '%{NAME}\n' | grep '^perl-' > /tmp/perl.pkgs
# rpm -e --justdb --nodeps perl `cat /tmp/perl.pkgs`
# mv /usr/lib/perl5 /usr/lib/perl5-
# yum install perl `cat /tmp/perl.pkgs`
PLEASE! Be careful with these commands, make sure you know what you're doing, check the /tmp/perl.pkgs file to make sure it seems reasonable etc. Once this is all done and finished, I removed the old perl5 library (perl5-).
As an alternative, you could also do something like
# rpm -q --qf '%{NAME}\n' --whatrequires perl > /tmp/perl.pkgs
but that will reinstall more packages than absolutely necessary, I think.