remove special characters

hello all

I am writing a perl code and i wish to remove the special characters for text.
I wish to remove all extended ascii characters. If the list of special characters is huge, how can i do this using substitute command
s/specialcharacters/null/g

I really want to code like
s/chr(128)..chr(256)//g... but this will not work. chr function is not working in the substitute command.

How can i do this on a single command line

need you provide some sample input

s/[\x80-\xff]//g

is what you tried to do. There are probably other better ways.

try this :wink:

# tr -d '\200-\377' < infile