Using Perl or Python programming languages, implement the Needleman-Wunsch algorithm to find the optimal global alignment between two sequences. The program should ask the user to input the two sequences first, then to choose from a list of scoring matrixes (BLOSUM62, PAM250, etc.), and finally set values for gap penalties. The program should output the final alignment and its total score.