Hi, i'm trying to write a small script for the website "www.fanfiction.net." This small perl script is part of a much larger script, which is why it has to be in Perl.
I am able to get the script to download the pages source code, and use regex to pull out what i need. The question is, is there a way to get perl to automatically submit the post command to the server only given the source code of the webpage.
2) Having collected the information you want from the page, you could just use some useragent to submit the appropriate PUT request to the server? You're already automating things after all, why bother futzing about with forms made for Puny Humans? :) Again, WWW::Mechanize's ua has a put() method that could do the job for you. To find out the parameters you need to submit you could use Firebug or something to look at your outgoing requests, or just look at the form field names in the markup.
N.B., some forms use sneaky obfuscation methods to prevent people like you from doing things like what you are trying to do (i.e. automate interaction with a page designed for humans), so how possible this is might depend on how serious fanfiction.net are about stopping you :) If they're fairly serious then yes, 2teez's proposed method of WWW::Mechanize::Firefox, which I believe more or less spins up a full Firefox instance and uses that to make requests, would be the way to go.
Finally, I'd recommend using something like HTML::TreeBuilder::XPath to pull the info you need out of the markup, rather than using regexen :)