Sure -

If your mailframe file gets to you as ascii,
you can pass throught it with a regex like:

  open MFILE, "$mfilename") or die ...
  for (<MFILE>) {
    s/[\x00-\x09]//g;
    s/[\x0B-\x0C]//g;
    s/[\x0E-\x09]//g;
    }

Most control characters are below \x20 (space).
The above perserves \x0A and \x0D, <LF> <CR>.
You may want to examine and strip characters above
\x7F also.

Aloha => Beau.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:activeperl-admin@;listserv.ActiveState.com]On Behalf Of Mohanty,
Debi (MED, TCS)
Sent: Thursday, October 31, 2002 7:29 AM
To: [EMAIL PROTECTED]
Subject: deleting control Characters...... Please help


Hi,
        
        I have a data file (which I get from the Mainframe), which
contains some sort of control characters. Is there any way where by I
can clean the file with perl. When I tried to copy those characters on
the file it shows me a message saying 
"cannot cut, copy or drag and drop text containing null (code=0)
characters". Is there any way I can clean these characters from the file
by using perl.

Thanks&Regards
Debi
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to