Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: A sub named ∃

by Steve_p (Priest)
on Nov 30, 2006 at 03:41 UTC ( #586854=note: print w/replies, xml ) Need Help??

in reply to A sub named ∃

I believe that this bug is to blame. There are plans to fix it, but, as of yet, I don't know that there has been any progress towards resolving it.

Replies are listed 'Best First'.
Re^2: A sub named ∃
by vkon (Curate) on Nov 30, 2006 at 11:11 UTC
    I suspect you know the situation better than me, but why in this particular case the explanation that
    will not suffice?
    Perl allows utf8-names from letters of non-English alphabets, although documentation strictly warns against this.

      /w isn't the pattern for matching the first character in identifiers. I never consider \w when matching that first character. In unicode, the pattern to follow is likely /\A\p{IdFirst}\w*\z/. In ASCII, the pattern is /\A[[:alpha:]_]\w*\z/. The pattern /\^\w+\z/ is always wrong when matching identifiers.

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

        all my concious life any unicode-capable perl matches with \w any unicode letter, and I often match russian letters e.g. 0x0432 with \w.

        I never did [[:alpha:]], but did succeeded russian letters matching with \w

Re^2: A sub named ∃
by ikegami (Pope) on Nov 30, 2006 at 16:36 UTC

    Note: In the following source code,
    replace "∃" with the UTF-8 representation of "∃", and
    replace "трщь" with the UTF-8 representation of "трщь".

    use strict; use warnings; no warnings 'redefine'; for ( [ "Symbol, use utf8: " => "use utf8; sub ∃ {}" ], [ "Symbol, no utf8: " => "no utf8; sub ∃ {}" ], [ "Russian, use utf8: " => "use utf8; sub трщ&#11 +00; {}" ], [ "Russian, no utf8: " => "no utf8; sub трщ&#11 +00; {}" ], ) { print $_->[0], eval "$_->[1]; 1" ? "Success\n" : $@; }
    Symbol, use utf8: Illegal declaration of anonymous subroutine at (eva +l 1) line 1. Symbol, no utf8: Illegal declaration of anonymous subroutine at (eva +l 2) line 1. Russian, use utf8: Success Russian, no utf8: Illegal declaration of anonymous subroutine at (eva +l 4) line 1.

    If the problem is what you say it is, wouldn't use utf8 have no effect on the error?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://586854]
[marto]: good morning all, TCIF
[Corion]: Hi marto! Indeed, Crunchy be thanked!
choroba had a Christams party at work yesterday. Slow morning today...
[Corion]: I guess I should not read some discussions on HackerNews - the crowd there is weirdly different - "you have to stay current in tech" (by following all the latest JS trends) is a meme there, but it doesn't really match my experience
[Corion]: At least in my area, experience can beat most new tech anyway because most new tech is just a rehash of things abandoned in the 70s and we still have a lot of that ;)
[Corion]: choroba: Ah, that will be next Friday for $work ;) Drinking enough water is key ;))
[Corion]: But then, maybe that's just my experience with things, and maybe Hacker News is just people much younger who haven't seen more than one tech cycle...
[choroba]: s/water/bear/ and s/enough/too much/

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2016-12-09 10:15 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (150 votes). Check out past polls.