What happens when you fix those syntax errors? Perl is telling you where to find them.
First, decide upon a sane indentation strategy and stick with it. Formatting your code consistently will aid in tracking down such mistakes as extra } braces.
Second (your first error, actually): You can't declare a single element of an array to be lexically scoped via my. my $elements[20] is wrong.
Dave
In reply to Re^2: Add whitespace in middle of string (substr?)
by davido
in thread Add whitespace in middle of string (substr?)
by Janwhatever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |