Or if you wanted to keep the original string for later :
$nospace = $1 if $string=~m/^\s*(\w+)\s*$/ ; print $nospace ;
In reply to Re: How to eliminate white spaces,tabs,new lines at thestart and end of a long string ??
by secret
in thread How to eliminate white spaces,tabs,new lines at thestart and end of a long string ??
by sugarkannan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |