Hello,
If I were doing all the work from scratch, I start with the modules from CPAN WWW::Mechanize (to list the profiles), HTML::TreeBuilder (to extract it) and DBI (to store the profiles).
If the username contains the constraints correctly within the table in your database is not necessary to check if the username is already registered in the database (I'm assuming postgres, mysql or some other "standard" market).
That said, as we say in Portuguese, I have "
give the gold to bandit", therefore, buy me a beer or contact me.
Thanks.