On Thursday 01 Jul 2010 18:41:54 Gaal Yahas wrote: > As far as I know, sub declaration won't take Unicode literals in Perl 5. > Calls will, though, so this works for me: > > > #!/usr/bin/perl > use utf8; > > *{"ש"} = sub { print "o hai\n" }; > > ש();
Not true: [code] #!/usr/bin/perl use strict; use warnings; use utf8; sub Héllo { print "Hello\n"; } sub Ezorא { print "EzorAleph\n"; } my $pounds = Héllo('AAA'); Ezorא(); [/code] Works like a charm. It's possible though that the leading character must be \w. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Optimising Code for Speed - http://shlom.in/optimise God considered inflicting XSLT as the tenth plague of Egypt, but then decided against it because he thought it would be too evil. Please reply to list if it's a mailing list post - http://shlom.in/reply . _______________________________________________ Perl mailing list Perl@perl.org.il http://mail.perl.org.il/mailman/listinfo/perl