While
1. A loop statement in programming that performs pre-defined tasks while in the process of doing something else. For example, in Perl, you may use code similar to the below, which is opening the file "file.txt" and while going through each of the lines in the file, printing them if they contain any letters.
open (INPUT, "<file.txt");
while (<INPUT>) {
if ($_ =~ /[a-zA-Z]/) {
print "$_";
}
}
close (INPUT);
Tip: Like any loop when creating a for loop make sure it condition will always be met to help prevent an endless loop.
2. Linux command, see the Linux while command page for further information about this command.
Also see: Do, Loop, Programming definitions
