Path: utzoo!attcan!uunet!cs.utexas.edu!usc!apple!mips!bridge2!mdb From: mdb@ESD.3Com.COM (Mark D. Baushke) Newsgroups: comp.lang.perl Subject: How do I delete all control characters from input Message-ID: Date: 25 May 90 02:18:12 GMT Sender: news@bridge2.ESD.3Com.COM Distribution: comp Organization: 3Com Corp., Mountain View, CA. Lines: 17 I want the perl equivalent of: tr -d '[\001-\011\013-\037\177]' without starting a tr process. I tried: $\ = "\n"; while (<>) {chop; tr/\001-\011\013-\037\177//; print;} with no luck. It is like the tr is not present. I know that I can use something like: $\ = "\n"; while (<>) {chop;tr/\001-\011\013-\037\177/ /; print;} to change all control characters to a space, but that is not what I need. Thanks in advance, -- Mark D. Baushke Internet: mdb@ESD.3Com.COM UUCP: {3comvax,auspex,sun}!bridge2!mdb