use Data Dumper to dump the reference
use Data::Dumper;
$scalar = 0;
$hashref = {};
$arrayref = [$scalar, $hashref];
$hashref->{arrayref} = $arrayref;
print Data::Dumper->Dump([$arrayref, $hashref], [qw(arrayref hashref)]);
Related examples in the same category