Here is the situation I am facing...
$perl_scalar = decode_json( encode (\'utf8\',$line));
decode_json returns a reference. I am sure this is a
You can also use the last index of the array to calculate the number of elements in the array.
my $length = $#{$perl_scalar} + 1;