check if @data really contains the expected number of elements.
make sure that your printed output is distinct (maybe empty string or undef in element).
make sure you use strict and warnings in your scripts
print "elements in \@data: ", scalar( @data ), $/; foreach my $name ( @data ) { print "<$name>"; }
update: quoted @. Thanks GrandFather
In reply to Re: foreach in array
by linuxer
in thread foreach in array
by loop362
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |