Subject: | No output to file |
Date: | Sun, 1 Nov 2020 17:23:20 +0100 |
To: | bug-File-Map [...] rt.cpan.org |
From: | "kris [...] btclinicalcomputing.com" <kris.vanbruwaene [...] gmail.com> |
I try to write some Json using File::Map. The json file is created, but
it's empty. No errors or warning. What am I doing wrong?
#!/usr/bin/perl
use common::sense;
use warnings qw(substr io);
use File::Map qw(map_file unmap);
my $json='{"family history":{"disorder":1}}';
my $json_file = "file.json";
map_file $json, $json_file, '>';
unmap $json;
Thanks
Kris Van Bruwaene