Ramprasad A Padmanabhan wrote:
Hello All
Hello,
I want to remove all characters with ascii values > 127 from a string
By definition ASCII only includes the characters in the range 0 to 127 so
those are non-ASCII characters.
Can someone show me a efficient way of doing this.
Currently what I am doing is reading the string char-by-char and check
its ascii value. I think there must be a better way.
$string =~ tr/\x80-\xFF//d;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>