Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 lurking in the Monastery: (6)
As of 2014-09-19 22:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (149 votes), past polls