Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^5: Efficient way to verify scalar contents

by haukex (Bishop)
on Jun 22, 2020 at 13:17 UTC ( #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 (Cardinal) 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
Node Status?
node history
Node Type: note [id://11118363]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2021-03-03 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (77 votes). Check out past polls.

    Notices?