in reply to Trimming whitespaces methods
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);
Once (shame on you!)
Twice (shame on me!)
More often than I'd like to be
All the time
Just when answering stupid polls
Who you callin' a fool?
I refuse to vote in this ridiculous poll
Results (501 votes). Check out past polls.