foreach my $row (1..$end)
{
foreach my $col (3..27)
{
# skip empty cells
next unless defined
$worksheet->Cells($row,$col)->{'Value'};
# print out the contents of a cell
$var = $worksheet->Cells($row,$col)->{'Value'};
push @dates, $var;
print $var; #this prints the value just fine
}
}
my %hash;
$hash{'first'} = \@dates;
print Dumper \%hash; #This prints object information
Sto usando l'OLE modulo per Perl e ogni valore ricevo dal mio foglio di lavoro e di stampa $ var allora ottengo il valore atteso, ma quando ho messo tutto in un stampa hash:di Perl Data :: Dumper mostra gli oggetti invece di valori
'first' => [
bless(do{\(my $o = 15375916)}, 'OLE::Variant'),
bless(do{\(my $o = 15372208)}, 'OLE::Variant'),
E così via. Non devo capire qualcosa sugli hash, perché sono davvero bloccato qui.
Ho pensato che fosse qualcosa di semplice. Grazie! – Melissa