Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How do I quickly strip blank space from the beginning/end of a string?

by ikegami (Patriarch)
on Jul 21, 2009 at 21:04 UTC ( [id://782079]=note: print w/replies, xml ) Need Help??


in reply to How do I quickly strip blank space from the beginning/end of a string?

$x =~ /.*[A-Z]/g and $x =~ s/\G.*//
can be written as
$x =~ s/(.*[A-Z]).*/$1/
and as
$x =~ s/.*[A-Z]\K.*// (requires 5.10.0)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-28 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found