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:\Rebecca\script\perl>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,cheng";
$str = ~ s/,//;
print $str, "\n";;
then we got:
C:\Rebecca\script\perl>perl status_v0.2_clear.pl
rebcheng
It is executed successfully after removing the space!!