Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by Anonymous Monk
on Sep 28, 2004 at 14:04 UTC ( [id://394584]=note: print w/replies, xml ) Need Help??


in reply to How can I strip an arbitary number of leading spaces from a string?

$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 Re: How can I strip an arbitary number of leading spaces from a string?
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-23 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found