Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: Efficient way to verify scalar contents

by LanX (Cardinal)
on Jun 22, 2020 at 12:12 UTC ( #11118361=note: print w/replies, xml ) Need Help??

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

Please correct me, but do these character classes not depend on localisation?

[[:lower:]] [[:upper:]]

I think passwords should rather be defined in terms of ASCII

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^3: Efficient way to verify scalar contents
by choroba (Archbishop) on Jun 22, 2020 at 12:22 UTC
    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?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2021-03-04 16:42 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (105 votes). Check out past polls.