my $label = defined($pieces[0]) ? $pieces[0] : "";


my @alreadyAddedCol = $node1->{DB}->getValues("select count(*) from sysibm.syscolumns where tbname=\'IBMQREP_SUBS\' and name=\'FROMPART\'");
my $exists = $alreadyAddedCol[0];
if($exists eq "0"){

最后的if这里总是提示使用了为初始化的变量,即使先给$exists赋值,再$exists = $alreadyAddedCol[0]也不行,搜到这个办法:
my $exists = defined($alreadyAddedCol[0]) ? $alreadyAddedCol[0] : "0";
问题顺利解决。

相关文章:

  • 2022-01-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-15
  • 2021-11-10
  • 2021-09-28
猜你喜欢
  • 2021-11-15
  • 2022-12-23
  • 2022-02-02
  • 2021-11-09
  • 2021-10-30
  • 2022-12-23
相关资源
相似解决方案