Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: what is the function should I need to use for trim white spaces ?

by GrandFather (Sage)
on Jan 11, 2006 at 19:25 UTC ( #522538=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    ($_ = $before) =~ s/^\s+|\s+$//g;
    print ">$before<\n";
    print "|$_|\n";
    
  2. or download this
    >   some text   <
    |some text|
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2020-06-06 21:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (41 votes). Check out past polls.

    Notices?