Skip to content
Snippets Groups Projects
Commit ddff6a6f authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

some debugging code

parent 63010c03
No related branches found
No related tags found
No related merge requests found
......@@ -51,11 +51,10 @@ sub write_json_file
=begin comment
open (J, '>:utf8', $json_fnm) or die ("can not write to [$json_fnm]");
open (J, '>:utf8', $json_fnm) or die ("can not write to [$json_fnm]; caller:", join (' ', caller()));
syswrite (J, $json_str);
close (J);
=end comment
=cut
......
......@@ -204,12 +204,16 @@ sub save_as_csv
my $eol= shift || "\n";
my $utf8= shift || 0;
unless (open (FO, '>' . $fnm))
unless (open (FO, '>', $fnm))
{
print "ATTN: cant save as csv [$fnm]\n";
return undef;
}
binmode (FO, ':utf8') if ($utf8);
if ($utf8)
{
print "ATTN: binmode :utf8 [$fnm]\n";
binmode (FO, ':utf8');
}
print FO join ($csv_sep, @$column_names), $eol;
my $lines= 0;
......@@ -238,7 +242,7 @@ sub save_hash_as_csv
my $eol= shift || "\n";
my $utf8= shift || 0;
unless (open (FO, '>' . $fnm))
unless (open (FO, '>', $fnm))
{
print "ATTN: cant save as csv [$fnm]\n";
return undef;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment