working lettercase percentage ratio solution in perl