use Test::More; # note I don't say how many there are # do what you have to do to get your list of links my @links = list_of_links(); # this happens at run time plan 'tests' => scalar @links; foreach my $link ( @links ) { ok( link_success( $link ), "link '$link' is good" ); }