in reply to searching a file
The exit is causing the program to end. How are you definining $username? Did you try printing $username and $username_db to be sure the values are what you expect before doing the if statement?
--
Diplomacy is the art of saying "Nice doggie" until you can find a rock.
naChoZ
In Section
Seekers of Perl Wisdom