$values[4] = "44"; print Dumper \@values; # generates the output $VAR1 = [ '00', '11', '22', '33', '44', undef, '66' ];