P
Peng Yu
ref is not capable to getting composite type information. In the
following example, I actually want to print that the type is array of
array (I would be better if it can print the first a few element in an
array). Is there a function for this in perl?
$ cat arrary_of_array.pl
#!/usr/bin/env perl
use strict;
use warnings;
my $aref=[
[1, 2, 3]
, [4, 5, 6]
, [7, 8, 9]
];
print ref($aref), "\n";
$ ./arrary_of_array.pl
ARRAY
following example, I actually want to print that the type is array of
array (I would be better if it can print the first a few element in an
array). Is there a function for this in perl?
$ cat arrary_of_array.pl
#!/usr/bin/env perl
use strict;
use warnings;
my $aref=[
[1, 2, 3]
, [4, 5, 6]
, [7, 8, 9]
];
print ref($aref), "\n";
$ ./arrary_of_array.pl
ARRAY