I am trying to compare the first value in the string array after split the string . But my sub function throwing error saying it receiving an array , What i am doing wrong .