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

Re^5: Efficient way to verify scalar contents

by haukex (Archbishop)
on Jun 22, 2020 at 13:17 UTC ( [id://11118363]=note: print w/replies, xml ) Need Help??


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

Note that both of your solutions don't report an error for e.g. 'aaaaaaaaa0-' and 'aaaaaaaaaaaaaaaaaaa', which are invalid as per the OP's code.

Replies are listed 'Best First'.
Re^6: Efficient way to verify scalar contents
by LanX (Saint) on Jun 22, 2020 at 13:22 UTC
    you are right, I had a bug in the uppercase rule!

    my $uppercase =  sub { /[a-z]/ ? "" : "has no uppercase character" };

    should be

    my $uppercase =  sub { /[A-Z]/ ? "" : "has no uppercase character" };

    C&P is your enemy! =)

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-19 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found