Hi harishnuti,
Here is one way, you can use String::Util module to trim leading and trailing spaces in neat way. You do similarly for array elements. TIMTOWTDI
use String::Util ':all'; $val = ' abc '; # "crunch" whitespace and remove leading/trailing whitespace $val = crunch($val); # remove leading/trailing whitespace $val = trim($val); print ">$val<";
Prasad
In reply to Re: Trimming whitespaces methods
by prasadbabu
in thread Trimming whitespaces methods
by harishnuti
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |