in reply to adding null values to the start of an array

use unshift to add items to the start of an array.

If by "null" you mean undef, then try this:

use Data::Dumper; my @array1 = qw( 1 2 3 ); my @array2 = qw( 4 ); unshift @array2, undef for @array1; print Dumper( \@array2 );

output:

$VAR1 = [ undef, undef, undef, '4' ];

--
"To err is human, but to really foul things up you need a computer." --Paul Ehrlich