in reply to Trying to manipulate data
Use a hash:
my %scores = ( 'Strongly Disagree', => 1, 'Disagree', => 2, 'Neutral' => 3, 'Agree' => 4, 'Strongly Agree' => 5 ); while ( $row = $sth->fetchrow_arrayref ) { $sheet->write_string($i, $_, $scores{ $row->[$_] } || $row->[$_], +$default_format) for (0..$#$row); $i++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trying to manipulate data
by emadmahou (Acolyte) on Jan 13, 2016 at 18:58 UTC | |
by 1nickt (Canon) on Jan 13, 2016 at 19:02 UTC |