Beefy Boxes and Bandwidth Generously Provided by pair Networks Ovid
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by karlgoethebier (Deacon)
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 browsing the Monastery: (3)
As of 2014-04-21 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (490 votes), past polls