Foreach

Updated: 06/16/2017 by Computer Hope

Foreach may refer to any of the following:

foreach1.Foreach is a loop statement in programming that performs predefined tasks while or until a predetermined condition is met. For example, in Perl you can use a foreach loop that prints all the elements of an array one by one. Sample code:

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

2.Foreach is also a Linux command, see the foreach command page for further information.

Do, For, Loop, Programming terms, While