There are many programs that do protein structural alignment. The amount of work it will take you to choose the one that suits your needs is much greater than the amount of work it will take you to figure out how to use it with Perl. You (or your boss) might be best off hiring someone who knows about structural alignment.