my $N = setupSub( %myParameters ); while (defined( my $at = stepSub())) { printf "%d percent done\n", $at/$N; } my $results = resultsSub();