How do I determine the number of elements in an array reference?

后端 未结 4 2006
名媛妹妹
名媛妹妹 2021-02-19 07:26

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

4条回答
  •  天命终不由人
    2021-02-19 08:01

    You can see the entire structure with Data::Dumper:

    use Data::Dumper;
    print Dumper $perl_scalar;
    

    Data::Dumper is a standard module that is installed with Perl. For a complete list of all the standard pragmatics and modules, see perldoc perlmodlib.

提交回复
热议问题