You need to insert semicolons between all your statements, including at the place that the syntax error occurs.
Please see perlintro and perlsyntax for detail.
In reply to Re: getting syntex error in pattern search
by moritz
in thread getting syntex error in pattern search
by ulaksh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |