<div dir="ltr">FWIW, BOM is not recommended for UTF-8.<div><br></div><div>Shlomit: you can also avoid literal Unicode in your source code altogether and say:</div><div><br></div><div> s/\x{05de}//g; # Mem == U+05de</div>
<div><br></div><div>Of course, we're assuming your strings are unicode. If that's not the case, and you're using ISO-8859-8 instead, you need another mem:</div><div><br></div><div> s/\x{ee}//g; # Mem == 238 or 0xee<br>
<br><div class="gmail_quote">On Fri, Jun 15, 2012 at 8:33 PM, Meir Guttman <span dir="ltr"><<a href="mailto:meir@guttman.co.il" target="_blank">meir@guttman.co.il</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
<br>
> -----Original Message-----<br>
> From: <a href="mailto:perl-bounces@perl.org.il">perl-bounces@perl.org.il</a> [mailto:<a href="mailto:perl-bounces@perl.org.il">perl-bounces@perl.org.il</a>] On<br>
</div><div class="im">> Behalf Of Meir Guttman<br>
> Sent: Friday, June 15, 2012 12:13 AM<br>
> To: 'Perl in Israel'<br>
> Subject: Re: [Israel.pm] substitute hebrew letter<br>
><br>
> > -----Original Message-----<br>
> > From: <a href="mailto:perl-bounces@perl.org.il">perl-bounces@perl.org.il</a> [mailto:<a href="mailto:perl-bounces@perl.org.il">perl-bounces@perl.org.il</a>] On<br>
> > Behalf Of Issac Goldstand<br>
> > Sent: Thursday, June 14, 2012 5:39 PM<br>
> > To: Perl in Israel<br>
> > Subject: Re: [Israel.pm] substitute hebrew letter<br>
> ><br>
> > Are you "use utf8"-ing or have a the source code saved as utf8 with a<br>
> > BOM? You'll need one or the other to use utf8 literals in the source<br>
> > code...<br>
> ><br>
> > Yitzchak<br>
> ><br>
><br>
> Hi Shlomit!<br>
> If Unicode text is part of the Perl program, you MUST place the «use<br>
> utf8;» pragma in it! No ifs and buts! Saving the file as utf8, with or<br>
> without a BOM (Byte Order Marker) has no bearing on your program<br>
> whatsoever!<br>
<br>
</div>Correction!<br>
The file MUST be saved as utf8 of course (otherwise the «use utf8» is simply wrong!)<br>
Bur BOM or no BOM, it doesn't matter.<br>
Meir<br>
<div><div class="h5"><br>
> Look up <a href="http://perldoc.perl.org/5.10.1/utf8.html" target="_blank">http://perldoc.perl.org/5.10.1/utf8.html</a> (or the same for your<br>
> Perl version).<br>
> Also looking up the Perl Unicode tutorial<br>
> <a href="http://perldoc.perl.org/5.10.1/perlunitut.html" target="_blank">http://perldoc.perl.org/5.10.1/perlunitut.html</a> could help.<br>
> If you will give me an e-mail address I'll send you a presentation<br>
> about "Unicode aspects in Perl" I gave awhile ago. (This list does not<br>
> care for attachments...) It will have some useful info I believe.<br>
><br>
> Regards<br>
> Meir<br>
><br>
><br>
> > On 14/06/2012 17:29, Shlomit Afgin wrote:<br>
> > ><br>
> > > Hello,<br>
> > > I'm trying to substitute letter in hebrew and It's do nothing.<br>
> > > I'm doing:<br>
> > > $str =~ s/מ//g;<br>
> > > And all the מ's still exist.<br>
> > ><br>
> > > How can I substitute a hebrew letters?<br>
> > ><br>
> > ><br>
> > > _______________________________________________<br>
> > > Perl mailing list<br>
> > > <a href="mailto:Perl@perl.org.il">Perl@perl.org.il</a><br>
> > > <a href="http://mail.perl.org.il/mailman/listinfo/perl" target="_blank">http://mail.perl.org.il/mailman/listinfo/perl</a><br>
> ><br>
> > _______________________________________________<br>
> > Perl mailing list<br>
> > <a href="mailto:Perl@perl.org.il">Perl@perl.org.il</a><br>
> > <a href="http://mail.perl.org.il/mailman/listinfo/perl" target="_blank">http://mail.perl.org.il/mailman/listinfo/perl</a><br>
> > No virus found in this incoming message.<br>
> > Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a><br>
> > Version: 9.0.930 / Virus Database: 2433.1.1/5068 - Release Date:<br>
> > 06/13/12 21:34:00<br>
><br>
> _______________________________________________<br>
> Perl mailing list<br>
> <a href="mailto:Perl@perl.org.il">Perl@perl.org.il</a><br>
> <a href="http://mail.perl.org.il/mailman/listinfo/perl" target="_blank">http://mail.perl.org.il/mailman/listinfo/perl</a><br>
> No virus found in this incoming message.<br>
> Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a><br>
> Version: 9.0.930 / Virus Database: 2433.1.1/5068 - Release Date:<br>
</div></div>> 06/14/12 09:34:00<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Perl mailing list<br>
<a href="mailto:Perl@perl.org.il">Perl@perl.org.il</a><br>
<a href="http://mail.perl.org.il/mailman/listinfo/perl" target="_blank">http://mail.perl.org.il/mailman/listinfo/perl</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Gaal Yahas <<a href="mailto:gaal@forum2.org">gaal@forum2.org</a>><br>
<a href="http://gaal.livejournal.com/">http://gaal.livejournal.com/</a><br>
</div></div>