Re: use perl to trim out non text characters from a file

2002-09-26 Thread Korthrun
Assuming that you are on a *nix box you can open the file in ex and strip it example: I want to take all the ^M's out of a file. root - local#ex somefile.ext 1,$s/.^M//g[enter] w [enter] of course you have to replace ^M with that crazy acii character. try cutting and pasting if you cant

RE: use perl to trim out non text characters from a file

2002-09-26 Thread david
Tim Booher wrote: > I don't know if they are truly "valid, printable characters". When a text > file show this type of information, isn't ascii just approximating some > binary data? > > Why I think this is if I open with notepad I get a file that looks like > the: ÿÿÿ described earl

RE: use perl to trim out non text characters from a file

2002-09-26 Thread Timothy Johnson
r'; [EMAIL PROTECTED] Subject: RE: use perl to trim out non text characters from a file On Sep 26, Timothy Johnson said: >while(){ > $_ = tr/[^characterclass]//g; > print OUTFILE $_; >} > >putting a ^ at the beginning of a character class matches if the >character is NO

RE: use perl to trim out non text characters from a file

2002-09-26 Thread Jeff 'japhy' Pinyan
On Sep 26, Timothy Johnson said: >while(){ > $_ = tr/[^characterclass]//g; > print OUTFILE $_; >} > >putting a ^ at the beginning of a character class matches if the >character is NOT one of those in the brackets. That's not at all how tr/// works. tr/// ALREADY is a character class operator,

RE: use perl to trim out non text characters from a file

2002-09-26 Thread Timothy Johnson
along those lines if you just want to get rid of non-printable characters. -Original Message- From: Tim Booher [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 6:44 AM To: 'Timothy Johnson' Cc: [EMAIL PROTECTED] Subject: RE: use perl to trim out non text characters f

RE: use perl to trim out non text characters from a file

2002-09-26 Thread Tim Booher
Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 8:36 AM To: 'Tim Booher'; [EMAIL PROTECTED] Subject: RE: use perl to trim out non text characters from a file Someone out there may have a better answer, but this one seems tougher than average becaus

RE: use perl to trim out non text characters from a file

2002-09-26 Thread Timothy Johnson
e the following: [a-zA-Z0-9_-=()\[\]\\\/'";:>mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 5:37 AM To: [EMAIL PROTECTED] Subject: use perl to trim out non text characters from a file Hello – this should be really simple to the learned perl programmer, but I am trying to crea

use perl to trim out non text characters from a file

2002-09-26 Thread Tim Booher
Hello – this should be really simple to the learned perl programmer, but I am trying to create a simple script to trim all the ‘junk’ out of my email files. I get a lot of suspicious emails in outlook and normally drag them to the desktop and open with notepad. This works, but most of the message