Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Searching Strings for Characters

by mfriedman (Monk)
on Jun 04, 2002 at 02:15 UTC ( #171383=note: print w/replies, xml ) Need Help??


in reply to Searching Strings for Characters

What exactly are you looking for in the string? All of the things you mentioned are fairly easy to detect:

String with all whitespace:

if ($string =~ /^\s+$/)

Or, to get rid of whitespace in the beginning of a string:

$string =~ s/\s+(\w.*)/$1/;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2021-06-18 12:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (89 votes). Check out past polls.

    Notices?