1. sub trim 
  2.         my $string = shift; 
  3.         $string =~ s/^\s+//; 
  4.         $string =~ s/\s+$//; 
  5.         return $string