There are a number of test modules for Perl, ranging from very simple tests through to very complex tests.Here are some links to some of them; all of these use the Test Anything Protocol to report their successes or failures:
TAP::Parser Cookbook - Cooking with TAP