use Data::Dumper; my @words = qw/ this Should produce Three null Values /; my @nulls = qw/ some stuff here /; unshift @nulls, (undef) x grep /^[A-Z]/, @words; print Dumper \@nulls; __ouytput__ $VAR1 = [ undef, undef, undef, 'some', 'stuff', 'here' ];