[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Stripping out crap characters in perl
- Subject: [ale] Stripping out crap characters in perl
- From: cfowler at outpostsentinel.com (Christopher Fowler)
- Date: 07 Sep 2005 11:03:05 -0400
I have written this program that interfaces with a modem and reads data
from a remote device. The remote device dials in and dumps stuff out.
As you know with modems that sometimes garbage is seen on connect and
disconnect. I store all my data in a variable "$buffer". Is there a
function in perl that can go through an delete all those bad characters
from the normal ones that can be written to a file and read by any text
editor. isprint() from ctype is not good because it will strip '\r' and
'\n' and those are valid characters.