in reply to How to dump a PDL

I don't know if it would affect execution time -- it might, by avoiding push -- but a Perlish way to do that would be:

my @scalar = map { $piddle->at($_) } 0 .. ($piddle->getdim(0) - 1);

I'm not familiar at all with PDL, but a quick look at the core docs shows that you can do this:

my @values = $piddle->at(0 .. ($piddle->getdim(0) - 1));

so I would assume there's an even easier way to do what you want in a single statement somewhere (maybe list, but the docs indicate that it's a last resort function).