If you want to change a variable,
then use it in addition to the array.
my $count = 10;
while ($count) {
#do something to array
print $array[$count--];
}
# alternative
$count =0;
for (@array) {
print "$count $_\n"; # $_ is the current array item
$count = &something_complex;
}
Anyway, the loop you want to use is an infinite loop,
unless you empty the array. It will test TRUE as long as
the array has more than 0 elements.
If you need a real infinite loop, then this one could suit
you better:
my $count =0;
while(1) {
# do something to the array
$count = &something_strange
last if (test_exit_condition);
}