#!/usr/bin/perl use strict; use helper; #... open(MYFILE, 'testcases.txt'); @HELPER::testCaseStack = ; close(MYFILE); foreach my $testCase (@testCaseStack) { undef %TESTCASE::; ##(1)## my $result = do($testCase); ##(2)## # do sth. with the result here next; EXIT_TESTCASE: ##(3)## # do sth. here next; EXIT_TESTRUNNER: ##(3)## # do sth. here last; }