in reply to what is the function should I need to use for trim white spaces ?
but you will like to use the s/// operator, true? :-)$value=" kkkk.123 "; for ( $i=0; $i<length($value); $i++ ) { if ( substr($value,$i,1) eq " " ) { substr($value,$i,1) = ""; redo; } else { last; } } for ( $i=length($value)-1; $i>0; $i-- ) { if ( substr($value,$i,1) eq " " ) { $value = substr($value,0,$i); } }
|
|---|