[Israel.pm] hebrew range

Ernst, Yehuda yernst at nds.com
Sun Oct 7 08:25:28 PDT 2007

hello !
I tryies and get this
Malformed UTF-8 character (unexpected non-continuation byte 0x2d, immediately after start byte 0xfa)


From: perl-bounces at perl.org.il on behalf of Yuval Kogman
Sent: Sun 10/7/2007 5:17 PM
To: Perl in Israel
Subject: Re: [Israel.pm] hebrew range

On Sun, Oct 07, 2007 at 14:11:33 +0200, Ernst, Yehuda wrote:
> Hello!
> I want to use range like
> [a-z]
> but in Hebrew from [?-?]
> How do i do it in perl?


use strict;
use warnings;

use utf8; # this is the important bit, it lets the ?-? be
interpreted as
# unicode characters, and makes sure the strings in the qw() are
# also unicode

binmode STDOUT, ":utf8"; # to prevent the wide character in print

foreach my $string qw(???? hello) {
        print "string matches: $string\n" if $string =~ /[?-?]/;

string matches: ????

  Yuval Kogman <nothingmuch at woobling.org>
http://nothingmuch.woobling.org <http://nothingmuch.woobling.org/>   0xEBD27418

Perl mailing list
Perl at perl.org.il

This e-mail is confidential, the property of NDS Ltd and intended for the addressee only.  Any dissemination, copying or distribution of this message or any attachments by anyone other than the intended recipient is strictly prohibited.  If you have received this message in error, please immediately notify the postmaster at nds.com and destroy the original message.  Messages sent to and from NDS may be monitored.  NDS cannot guarantee any message delivery method is secure or error-free.  Information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.  We do not accept responsibility for any errors or omissions in this message and/or attachment that arise as a result of transmission.  You should carry out your own virus checks before opening any attachment.  Any views or opinions presented are solely those of the author and do not necessarily represent those of NDS.

NDS Limited Registered office: One Heathrow Boulevard, 286 Bath Road, West Drayton, Middlesex, UB7 0DQ, United Kingdom. A company registered in England and Wales  Registered no. 3080780   VAT no. GB 603 8808 40-00

To protect the environment please do not print this e-mail unless necessary.

More information about the Perl mailing list