Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by Anonymous Monk
on Sep 28, 2004 at 14:04 UTC ( #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? - Answer 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?
[Corion]: Heh. The JSON link for Strawberry releases gives me the idea that I should provide an RSS proxy so people can get notified when a new release is there...
[Corion]: In other RSS news, I've updated my photo stream with images from Lanzarote
[choroba]: Corion Nice

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2017-02-27 08:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (377 votes). Check out past polls.