Run perl command in script[solved]

Hi all,

When I put the Perl command in a script, I got error.

system("perl -pi -e 's@words[$k]@words[$k+1]@g' myFile");

The error is:
Unrecognized character \x8A; marked by <-- HERE after <-- HERE near column 15 at -e line 1.

Thanks in advance.

---------- Post updated at 06:30 AM ---------- Previous update was at 03:49 AM ----------

It solved!

$line=~ s/@words[$k]/@words[$k+1]/;