while( countdown( $limit )->( my $x ) ) { # do something with $x }