use Test::More; # you may need to install it my @test_these = ( 'fruit' , 'animal' , 'tree' , 'goat' ); # The Test::More synopsis suggests you do this # with the use above, but I found that I needed # to set it dynamically after determining how # many tests I was going to run plan tests => scalar(@test_these) + 2; # now we can create a "test" ok( $test_these[0] eq 'fruit' , 'The first element is "fruit"' ); # that's it, that's all you have to do to "test" something. # The ok is the exported function from Test::More and determines # if the first argument is true or false ( 1 or 0 ) # Now I admit that was a stupid test, since we have a # hard coded array so lets do something else foreach (@test_these) { ok( m/i/ , "our element has an 'i' in it" ); } # That will test to see if the list item has an 'i' # in it and in this case some of the tests will fail. # one last test undef @test_these ok( !@test_these , 'no more @test_these!' ); 1;