Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Removing Non-Ascii chars from text file

by Anonymous Monk
on Jun 08, 2007 at 02:26 UTC ( #619937=note: print w/replies, xml ) Need Help??


in reply to Removing Non-Ascii chars from text file

perl -pe '($c,$d)=(32,126); s/(.)/(ord($^N)>$c-1 and ord($^N)<$d+1)?$^ +N:""/ge;'
(There are much better solutions available if you don't want to specify a range, but something like this is what I gathered from your post.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://619937]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2019-07-20 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?