Your file "/users/sukeerthiteja/desktop/perl/NM_021964fragment.pep" contains only one value or line? Because if it contains more than one line of information , your assigning of
"$protein = <PROTEINFILE>;"
will not work. It will only he last line of your file. IF thats the case you have to read the filehandle through a while loop.