我试过使用:
my $nomIHMBloc = $1;
print decode_entities($nomIHMBloc), "\n";
$nomIHMBloc = decode_entities($nomIHMBloc), "\n";
但没有运气。有什么问题吗?我收到错误:
Undefined subroutine &main::decode_entities called at "same perl file"
谢谢你的帮助。
PS:确切的代码在这里:
while($blocVars =~ m/\[(.*?)\]/g){
binmode STDOUT, ':utf8';
my $nomIHMBloc = $1;
print decode_entities($nomIHMBloc), "\n";
$nomIHMBloc = decode_entities($nomIHMBloc);
print "nomIHMBloc::::::::$nomIHMBloc=============$1\n";
print "insert into ASSOC_VAR_BLOC (ID_BLOC, ID_VAR, DOC_ID_MAQUETTAGE) VALUES ($id_bloc, (SELECT ID_VAR FROM VARIABLE WHERE NOM_IHM='$nomIHMBloc'),'$docId')\n";
}