in reply to array empty when calling script with getopt::long
Declaring and defining your @amino array before calling your GetOptions subroutine should be a remedy to your immediate problem. But, as already pointed out by other monks, there are a number of other issues in your code, including especially the fact that nobody knows what there is in the $substr1 and $substr2 variables, and that I do not understand what you are trying to achieve exactly with your pattern matching expression.