Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: trim leading & trailing whitespace

by brian_d_foy (Abbot)
on Mar 31, 2005 at 19:37 UTC ( #443942=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $string =~ s/^\s+|\s+$//gm;
    
  2. or download this
    s/^[\t\f ]+|[\t\f ]+$//mg;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-03-29 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (629 votes), past polls