in reply to remove both leading and trailing spaces
$val=" Smart Way ";
$val=~s/(^\s+|\s+$)//g;
print '>'.$val.'<';
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: remove both leading and trailing spaces
by softworkz (Monk) on Sep 26, 2003 at 16:52 UTC | |
by softworkz (Monk) on Sep 26, 2003 at 17:02 UTC | |
by the_0ne (Pilgrim) on Sep 26, 2003 at 20:46 UTC |
In Section
Seekers of Perl Wisdom