in reply to perl grep help!

I did not spy a question-mark in your post. What is your question? Do you only want to match the exact username and password? Because your code would also match 'user899', 'newuser89', etc. You may want /^$usernameentered$/ if this is the case. It is left as an exercise for the user to modify this if possible whitespace could be present...