my $test_list = "some_tests"; open TESTS, $test_list or die "Can't open $test_list: $!\n"; my @tests; while () { my %tests; next if /^\s*$/; my $temp = $_; if ($_ =~ /\//) { $temp =~ s/\/.*//; chomp $temp; s/.*\///; } else { $temp = "*"; } chomp; $tests{$_} = $temp; push @tests, %tests; } close TESTS; my $count = 0; for (@tests) { $count++; my %tests = $_; my ($test, $category) = each %tests; print "Starting $test... ($count/@{[scalar @tests]})\n"; print "Test: " . $test . "\n"; print "Category: " . $category . "\n"; }