Formatting problem with cat, egrep and perl

Hi guys I'm using the following script to change input file format to another format. some where I'm getting the error. Could you please let me know if you find out?

cat input.txt|egrep -v �^#'|\ perl -ane �if (@F>3){$_=~/(chr.+):(\d+)\ s([F|R])/;print $1,�\t�,$2,�\t�,($2+35),�\n�}'\ > output.bed

error

bash: syntax error near unexpected token `('

---------- Post updated 02-09-10 at 12:06 AM ---------- Previous update was 02-08-10 at 11:44 PM ----------

Thanx guys. I figured it out. Some extra spaces...

There's an illegal backslash after the pipe. (The backslash is unnecessary even if the perl command is on the next line.)

You should use ', not � and '

Also, UUOC.