Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by karlgoethebier (Curate)
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 contemplating the Monastery: (7)
As of 2014-08-29 06:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls