So far as I can see your subroutines do not explicitly return anything. With no return statement they will return the value of the last statement within them. That's fine for change_array, but the line my @oligo_array = get_oligo_seqs($in1); looks suspicious to me, since get_oligo_seqs does not return an array (I think it will give a single element containing an empty string).
I wonder if you are confusing the print statement with a return?