Are you using the Selenium IDE FireFox plug-in to record your session and then modify it? Also, you are using Test::WWW::Selenium
. I think you want the latter not the former.
I am not sure how to help you. Your code sample is fairly useless without the real website so that I can try it here to see what you are doing wrong. I am sorry, but unless you want to share the website and possibly login credentials, I can't guess what you are doing wrong.
Update: As to your syntax errors - you should always use strict and use warnings. You have used else when you meant elsif. Also, you should either \@anywhere.com or you should use single quotes because it thinks your email address is really an array.