Skip to content
Snippets Groups Projects
Commit 1eaa5832 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- fixed output if value not defined

parent fc04f1b2
Branches
Tags
No related merge requests found
......@@ -15,7 +15,7 @@ sub print_results($headers_ref, $result_ref) {
my $line = $_;
my $res_line = join(
",",
map {$line->{$_}} @{$headers_ref}
map {$line->{$_} // ""} @{$headers_ref}
);
$res_line;
} @{$result_ref}
......
......@@ -20,7 +20,9 @@ sub print_results($header_ref, $result_ref) {
print CHR_ROW_TERMINATOR;
print join("", map {
my $line = $_;
my $res_line = join("", map {$line->{$_} . CHR_VALUE_TERMINATOR} @{$header_ref}
my $res_line = join("", map {
($line->{$_} // CHR_NULL) . CHR_VALUE_TERMINATOR
} @{$header_ref}
);
$res_line . CHR_ROW_TERMINATOR;
} @{$result_ref}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment