Tag: undef

Spreadsheet :: ParseExcel $ cell-> value()返回undef

我是新来的Perl和电子表格Excelparsing器模块遇到麻烦。 当我在它自己的行上使用$ cell-> value()时,似乎没有问题,但是当我尝试使用它将值插入数组时,它将返回undef,代码如下所示: for my $row ($row_min .. $row_max) { my @line; for my $col ( $col_min .. $col_max) { my $cell = $worksheet->get_cell( $row, $col ); $value = $cell->value; push @line, $value if defined($cell); print $cell->value; print Dumper $line; } } } 这里打印$ cell-> value; 返回单元格的内容,但打印Dumper $行; 返回undef