James Kipp wrote: > > Hi Hello,
> I have some C code that I need to convert to perl and I am pressed for time, > which is why I am posting this. All the code does is read each character > from either STDIN or a file and replaces any ASCII control characters with a > space. Including "\t" and "\n"? > Is the perl getc() function the best way to look at one char at a time? In any language doing it one character at a time is not the best way. perl -i.bak -pe's/[[:cntrl:]]/ /g' file1 file2 file* If you don't want to include "\t" and "\n" in that: perl -i.bak -pe's/[^\t\n[:^cntrl:]]/ /g' file1 file2 file* John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]