Below is the perl code
use Spreadsheet::WriteExcel;
my $workbook = new Spreadsheet::WriteExcel( 'one_worksheet.csv' );
my ${path_1} = $workbook->add_worksheet('Max Input');
my ${path_2} = $workbook->add_worksheet('Min Input');
foreach (keys %max_hash ) {
${$_}->write(0, $column, "$max_hash{$_}" );
$column = $column + 1;
}
I get this error
"Can't use string ("path_1") as a SCALAR ref while "strict refs" in use".
%max_hash
has the keys path_1
and path_2
.
What is the solution?