Hi, I want to check for some ASCII chars in perl like following "C" code..
How to do this in Perl ? follwing will work in perl ? for($i=0;$i < length;$i++) { if (($_[$i] < 32) || (($_[$i] > 126)) { print "Char is non printable char\n"; } } following is C code for(i=0;i<(int)strlen(Buffer);i++) { if((Buffer[i] < 32) || (Buffer[i] > 126)) { if((Buffer[i] == 10) || (Buffer[i] == 13)) { Buffer[i] = '\0'; } else { BadRec = 1; if(Buffer[0] != 26) { BadCnt++; fprintf(Reject,"%s\n",Buffer); } else Ignore++; } __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]