Foreach

1. A loop statement in programming that performs predefined tasks while or until a predetermined condition is met. For example, in Perl you may use a foreach loop similar to the below example that goes through each of the elements of an array and prints the contents with a new line character after it.

foreach $value (@value) {
print "$value\n";
}

2. Linux command, see the Linux foreach command for further information about this command.

Also see: Do, For, Loop, Programming definitions, While