in reply to perl grep help!
if (@username !=$usernameentered)
The array @username will be used in scalar context, so will return the number of items in the array.
If you did use a scalar instead of an array then the != is incorrect, use ne for testing text.
You must indent your loops and if statements, otherwise a kitten will die.