Speaking of the login procedure, DoLogin() seems to ask for an "RSA key" from the server and do the real authentication in another function called OnRSAKeyResponse. So, after you get the key by something like $lwp->post('https://steamcommunity.com/login/getrsakey/', { username => $username, donotcache => time() }) (untested; you may need to decode the answer if it's JSON), you'll need to do something else as described in OnRSAKeyResponse() function somewhere in JavaScript files. RSA-related modules (Crypt::RSA?) might help with this.
Edit: I should also note that this approach will fail after site developers update login interface, because it's not public API which they are required to maintain in a persistent way. Generally, it's wiser so search whether the site you want to use provides an API. Steam Community seems to have one: http://steamcommunity.com/dev. Does it fullfill your needs?