Fixed perl syntax errors