perl中去掉字符串中空格
Perl code
use strict; use warnings;
my $str=" \n aaa bbb\n "; $str=~s/^\s+|\s+$//g; print($str); ^D aaa bbb
Perl code
use strict; use warnings;
my $str=" \n aaa bbb\n "; $str=~s/^\s+|\s+$//g; print($str); ^D aaa bbb
暂无评论。
评论功能维护中,当前仅展示历史评论。