Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: remove both leading and trailing spaces

by davido (Cardinal)
on Sep 26, 2003 at 06:18 UTC ( [id://294345]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $val = "       Smart Way      ";
    $val =~ s/^\s+|\s+$//g;
    print '>', $val, '<';
    

Log In?
Username:
Password:

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

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

    No recent polls found