Types of Tests: Unit Tests, Integration Tests, System Tests
Unit tests test only a single "unit" of the code (say a module or a class), to see if it behaves as expected. They generally make sure that the behaviour of the module is sane and desirable, while not trying to see if it works as part of the larger scheme.
On the other hand, system tests test the entire system. For example, if we're writing code to generate a web-site, we could test that the various pages of the resultant site contain some of the qualities that we expect. System tests tests the system as a whole, to see if there's a bug somewhere.
Between unit tests and system tests there could be several intermediate layers of tests, normally called integration tests .
You can write all these tests using TAP, Test::More and other testing modules on the CPAN, but it's important to be aware of the distinction.