It's customary to specify what error message you're getting.
Those constructs are explained pretty clearly in perlintro and perlsyn.
Another issue: @somearray[1] is an array slice. While it's syntactically correct, it's semantically mistaken to use an array slice when you really mean to refer to a single element by its index. $somearray[1] would be the semantically proper way to do that.
Dave
In reply to Re: Syntax error if clausule
by davido
in thread Syntax error if clausule
by robertw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |