It sounds like you want Test::Output. Whenever you have a question about how to test something, check the list of Test::* modules. There's probably one that does it for you already.
--
brian d foy <brian@stonehenge.com>
Comment on Re: How do you Test that the right output got printed?