use Test::More qw(no_plan); $\="\n"; # here will be file name which will store the log o/p print "hello world"; pass("hello world"); fail("do nothing"); diag("hi frend"); use_ok("fake_module"); print "bye"; #### hello world ok 1 - hello world not ok 2 - do nothing # Failed test 'do nothing' # at C:/test/tst.pl line 8. # hi frend not ok 3 - use fake_module; # Failed test 'use fake_module;' # at C:/test/tst.pl line 10. bye # Tried to use 'fake_module'. # Error: Can't locate fake_module.pm in @INC (@INC contains: C:/test C:/strawberry/perl/lib C:/strawberry/perl/site/lib .) at (eval 4) line 2. # BEGIN failed--compilation aborted at (eval 4) line 2. 1..3 # Looks like you failed 2 tests of 3.