use warnings; use strict; use Data::Dumper; use JSON; my $today = '2019-12-23'; my @array = ($today); my $j = encode_json \@array; my $p = decode_json $j; print Dumper $p;