Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: How to check if a string contains more than 1 character?

by karlgoethebier (Vicar)
on May 02, 2013 at 13:26 UTC ( #1031754=note: print w/ replies, xml ) Need Help??


in reply to How to check if a string contains more than 1 character?

Update:

sub karls_has_more_than_1_char { ( shift =~ /.{2,}/ ) ? 1 : return; } sub karls_has_more_than_1_char_2 { ( shift =~ /(.{2,})/ ) ? $1 : return; }

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»


Comment on Re: How to check if a string contains more than 1 character?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2015-04-21 07:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who makes your decisions?







    Results (389 votes), past polls