Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Answer: How can I strip an arbitary number of leading spaces from a string?

( #394584=categorized answer: print w/ replies, xml ) Need Help??

Q&A > strings > How can I strip an arbitary number of leading spaces from a string? contributed by Anonymous Monk

$string =~ s/^\s+//gm; this will start at the beginning and only continue as long as there is whitespace left at the beginning of the string.

Comment on Answer: How can I strip an arbitary number of leading spaces from a string?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2014-07-11 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (220 votes), past polls