in reply to PDL rcols : Replacing missing values with 0
You could do that with an array slice:
use Data::Dumper; my (@array, $scalar); ($scalar, @array[0..3]) = qw/a b c d/; print Dumper \@array;
$VAR1 = [ 'b', 'c', 'd', undef ];
Since it's to read a file with *custom separator* separated values, maybe Text::CSV could suit you as well.
|
|---|