http://www.perlmonks.org?node_id=294490


in reply to Re: remove both leading and trailing spaces
in thread remove both leading and trailing spaces

I find this way to be pretty fast on windoze, can someone benchmark it?
#!/usr/bin/perl -w use strict; my $val=" Smart Way "; $val = join (" ",split " ",$val); print '>'.$val.'<'; # shld give me >Smart Way<