Thanks, jeffa. I expected that printing from subroutines will be blamed here. :) But how you will test sub print_foo_message then? Of course, it's too simple, but it is just an example. I'm interested in testing the output, at least, I need to test the fact that something was printed.