I am writing a python script, from I am trying to call perl script. The input to the perl scripts are python arguments.
row[i[k]]=re.sub(r"^_", "", row[i[k]])
row[i[k]]=re.sub(r"{", "[", row[i[k]])
row[i[k]]=re.sub(r"}", "]", row[i[k]])
row[i[0]]=re.sub(r"^_", "", row[i[0]])
row[i[0]]=re.sub(r"{", "[", row[i[0]])
row[i[0]]=re.sub(r"}", "]", row[i[0]])
cmd = "perl process_str.pl -str1 "row[i[0]]" -str2 "row[i[k]]""
os.system(cmd)
But I'm seeing following error on running the python script:
cmd = "perl process_str.pl -str1 "row[i[0]]" -str2 "row[i[k]]""
^
SyntaxError: invalid syntax
cmd = "perl process_str.pl -str1 'row[i[0]]' -str2 'row[i[k]]'"