Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

by blahblahblah (Priest)
on Jul 21, 2009 at 20:47 UTC ( [id://782077]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
         How do I strip blank space from the beginning/end of a
         string?
    ...
    
                 s/^\s+//;
                 s/\s+$//;
    
  2. or download this
    use Benchmark 'cmpthese';
    
    ...
    [16:10] <Joe> capt_repl 271691/s        4%        --       -3%      -6
    +8%
    [16:10] <Joe> rx_rx     279271/s        7%        3%        --      -6
    +7%
    [16:10] <Joe> last      859023/s      228%      216%      208%        
    +--
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-16 23:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found