> >    if ( (ch<=0176) && (ch>=040) || (ch=='\n') ) {
> >      putc( ch, stdout );
> >    } else {
> >      putc( ' ', stdout );
> >    }
> >  }
> 
>   perl -pi.bak -e 'tr/\040-\176\n/ /c' file
> 

Thanks. For some reason, this is not working like the C code is ( my desired
result)

C:
echo     | cvt 
adc def
hij

Perl:
echo "abc^Hdef\nhij"  | perl -pe 'tr/\040-\176\n/ /c'             
abc^Hdef
hij





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to