[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Stripping out crap characters in perl



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.