Error in perl matching
We got this error by running: ? my $str = "reb,cheng"; $str = ~ s/,//; print $str,"n"; ? seems everything is okay,but why? Here is the error message: C:Rebeccascriptperl>perl status_v0.2_clear.pl Use of uninitialized value $_ in substitution (s///) at status_v0.2_clear.pl line 88,<DATA> line 751. 18446744073709551615 ? Notice there is a space between “=” and “~”,the correct way should be NO SPACE between them: my $str = "reb,"n";; ? then we got: C:Rebeccascriptperl>perl status_v0.2_clear.pl rebcheng ? It is executed successfully after removing the space!! (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |