http://qs321.pair.com?node_id=196673

peacemaker1820 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks.
I would like to trim some words in my data file from the leading and trailing spaces. Let's say if I have:
$temp = " Hello ";
after doing this,
$temp =~ s/^\s+//;
that will drop all the leading and trailing spaces
This will certainly solve my problem, but I was wandering if there is a built in SUB for strings in Perl that does the same job?
Thanks.