use strict; use PDL; my $arref; while() { push @$arref, $_; } my $p = pdl($arref); print $p,$/; __DATA__ 1.0 2.2 3.1 4.0 5.5 10.0 20.0