Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Efficient way to verify scalar contents

by choroba (Cardinal)
on Jun 22, 2020 at 12:22 UTC ( [id://11118362]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Efficient way to verify scalar contents
in thread Efficient way to verify scalar contents

I'm not sure. I remember [a-z] depending on locale, but it was probably in bash rather than Perl...
$ (LC_ALL=en_US.UTF-8; [[ é =~ [a-z] ]] || echo no) $ (LC_ALL=C; [[ é =~ [a-z] ]] || echo no) no $ perl -Mutf8 -wE 'say "é" =~ /[[:lower:]]/' 1 $ perl -Mutf8 -wE 'say "é" =~ /[a-z]/' $

Update: Switched from <c> to <pre> and back.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found