Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: A sub named ∃

by vkon (Curate)
on Nov 30, 2006 at 11:11 UTC ( [id://586910]=note: print w/replies, xml ) Need Help??


in reply to Re: A sub named ∃
in thread A sub named ∃

I suspect you know the situation better than me, but why in this particular case the explanation that
∃!~/\w/
will not suffice?
Perl allows utf8-names from letters of non-English alphabets, although documentation strictly warns against this.

Replies are listed 'Best First'.
Re^3: A sub named ∃
by diotalevi (Canon) on Nov 30, 2006 at 16:48 UTC

    /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

        \w is [_\p{IsAlpha}\p{IsNumeric].

        ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://586910]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-23 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found