[Israel.pm] 8-bit characters recognition

Shlomi Fish shlomif at iglu.org.il
Wed May 19 05:35:25 PDT 2004

On Wednesday 19 May 2004 15:03, Roman M. Parparov wrote:
> Hello,
> What would be a simple way to recognize if an 8-bit (ord($c) > 0x7f)
> character is present in a string?

if ($string =~ /[\x7F-\xFF]/)
	print "There's a high charactre in your string\n";

Don't ask me what happens with locales and stuff like that.


	Shlomi Fish

Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://shlomif.il.eu.org/

Quidquid latine dictum sit, altum viditur.
        [Whatever is said in Latin sounds profound.]

More information about the Perl mailing list