in reply to Validating using WWW::Mechanize

Your code worked for paypal. However not all websites are like paypal.

If you try and log into "SiteB", then carefully look at the HTML source of the "SiteB" log-in page. Is it using javascript? Does it require a different button to be pressed?

There is no easy answer to your question. But the good news is you figured out paypal.. which means you can probably figure out "SiteB".