Updated: 01/18/2023 by Computer Hope

Do may refer to any of the following:

White do on orange background

1. A "do" is a loop statement in programming that performs pre-defined tasks while or until a pre-determined condition is met. For example, in the below Perl code the do loop runs until the $count variable has reached the value of 9.

my $count = 0;
do {
 print "$count\n";
} until ($count >= 10);

Like any loop, when creating a do loop make sure it contains an exit condition (e.g., counter) that prevents an endless loop.

2. The Internet domain suffix .do is short for Dominican Republic.

For, Iteration, Loop, Programming terms, While