@HappyArray is an array of strings, and $printnumber is the index of the element you are referring to. Change line 5 of your snippet to either: $printnumber++; or $printnumber += 1; and you will be okay. (Perl doesn't have an inc() function that I'm aware of, or that I can find in the Library section here.)
Hope that helps.
In reply to Re: Syntax error with loops
by atcroft
in thread Syntax error with loops
by OxYgEn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |