loop through array in perl code example
Example: perl array loop
# syntax
foreach my $<element-name> (@<array-name>) {
# use $<element-name> in code
print $<element-name> . "\n";
}
# example
my @YourArray = ("a","bb","ccc");
foreach my $element (@YourArray) {
print $element . "\n";
}