UPDATED#2
Try with print 'my $aRef = ', Dumper(\@A), ";";
. It will print like this:
my $aRef = [
[
1,
2
],
[
3,
4,
5
],
[
6,
7,
8P
]
]
;
If You want to change the output of Dumper you can redirect the stdout to a variable (see open).
print map { "Something $_\n" } split "\n", Dumper(\@A);
Output:
Something [
Something [
Something 1,
Something 2
Something ],
Something [
Something 3,
Something 4,
Something 5
Something ],
Something [
Something 6,
Something 7,
Something 8
Something ]
Something ]