my $start; my $total; for ($start=0; $start<=$total; $start++) { #do stuff in the loop } #### elsif ($counter == 5) { print "Finishing up.\n" }