use Data::Dumper; $arrayref1 = [1, 2, 3]; $arrayref2 = [4, 5, 6]; print Data::Dumper->Dump([$arrayref1, $arrayref2], [arrayref1, arrayref2]);