sub selectrow_array {
my $row = _do_selectrow('fetchrow_arrayref', @_) or return;
return $row->[0] unless wantarray;
return @$row;
}
The docs hint that this should work as well, but don't explicitly state it. Instead the docs mention this:
If called in a scalar context for a statement handle that has more than one column, it is undefined whether the driver will return the value of the first column or the last. So don't do that.
Anyway, it won't hurt to add the brackets in there to force list context, but it shouldn't be required. |