By default, Perl's split() function drops trailing empty fields,
which is not what we want here. Oversight in commit
fb093e4cb.
We'd managed to miss it thus far thanks to the very limited usage
of this function.
Discussion: https://postgr.es/m/14837.
1499029831@sss.pgh.pa.us
#
my %val;
@val{@columns} =
- $result ne '' ? split(qr/\|/, $result) : ('',) x scalar(@columns);
+ $result ne '' ? split(qr/\|/, $result, -1) : ('',) x scalar(@columns);
return \%val;
}