$str = DBI::neat ($value [, $maxlen]);
Returns a string containing a nicely formatted representation of the $value argument. Strings are returned with surrounding quotes; numbers are not. (But note that quoted numbers are considered to be strings.) Undefined values are reported as undef, and unprintable characters are reported as '.' characters. For example, if you execute the following loop:
for my $val ("a", "3", 3, undef, "\x01\x02")
{
print DBI::neat ($val) . "\n";
}
The results look like this:
'a'
'3'
3
undef
'..'
The $maxlen argument controls the maximum length of the result. If the result is longer than $maxlen, it is shortened to $maxlen4 characters and "...'" is added. If $maxlen is 0, undef, or missing, it defaults to the current value of $DBI::neat_maxlen, which itself has a default value of 400.
Don't use neat() for statement construction; if you need to perform quoting or escaping of data values to be placed into a statement string, use placeholders or the quote() method instead.
$str = DBI::neat_list (\@ary
[, $maxlen
[, $sep]]);
Calls neat() for each element of the list pointed to by the first argument, joins them with the separator string $sep, and returns the result as a single string.
The $maxlen argument is passed to neat() and thus applies to individual arguments, not to the combined result of the neat() calls.
If $sep is missing, the default is ", ".