> >$string =~ s/^\s+//; # Trim leading white-space >$string =~ s/\s+$//; # Trim trailing white-space >
You could get it more shorter as: $string =~ s/^\s+|\s+$//g; :-) -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>