#$ppi_pm_seq and $mpi_pm_seq are defined from database. Can I use them as is, or would i need to push them all into a single list to run through this? my ($eval_1, $eval_2) = ($ppi_pm_seq, $mpi_pm_seq); #OR foreach $condensed_sequence_list_item my $eval = $condensed_sequence_list_item ;; my $n = 12; ;; my $extraction = my ($before, $mid, $after) = $eval =~ m{ \A (.{$n}) (.) (.{$n}) \z }xms; ;; die qq{no extraction from '$ppi_pm_seq'} unless $extraction; ;; my ($eval_A, $eval_T, $eval_C, $eval_G) = map qq{$before$_$after},$mid, grep $_ ne $mid, qw(A T C G) #this is where i get lost though. It seems like this is going to force create the 4 possible answers? Would I then do something like... my $mm1 = "select seq from seq_table where seq = $eval_A"; my $mm2 = "select seq from seq_table where seq = $eval_T"; my $mm3 = "select seq from seq_table where seq = $eval_C"; my $mm4 = "select seq from seq_table where seq = $eval_G"; #even though I am labeling them here as mm, one of them is my pm target. (I'd need to identify that at some point.) Also, these sequences may not exist. There is one guaranteed mm per pm, and possibly an additional two