Perl, foreach order
Posted
by Mike
on Stack Overflow
See other posts from Stack Overflow
or by Mike
Published on 2010-06-15T16:10:47Z
Indexed on
2010/06/15
16:22 UTC
Read the original article
Hit count: 184
Does Perl's foreach
loop operator require that the list items be presented in order?
For example
my @a=(1,2,3);
foreach my $item (@a) {
print $item;
}
will always print 1 2 3?
I suspect so, but I can't find it documented.
© Stack Overflow or respective owner