in reply to Passing Values to a webpage and retrieving an answer
would suffice for that purpose. This "input=>te" means nothing. In order to send a response to this server, you need to use the POST method to send your text back (based upon the received webpage) and specify the action. This will have the effect of clicking on the "submit" button.my $response = $ua->get('http://sentimentanalyzer.appspot.com');
While looking at this page, I learned of this "curl" freeware program. They give an example of how to use it with their page. That looks pretty straight-forward to me for this simple application. But I have never used Curl.
If this is all you need to do, I would follow their suggestion and use this freeware Curl thing. I've written a number of these LWP programs and often spent hours or even days figuring out the right "incantation".
Anyway, if you just need this one website's function, I would install and run Curl, my $result = `curl ...whatever...` . Get that working, then tackle a more general solution with Perl's various LWP methods including of course LWP and Mechanize - this can get very complicated!
I would concentrate on making your first Perl web program a success rather than having to know/learn a lot of sophisticated stuff that is not necessary for the job at hand.
Update: Just tried this advice, and although it sounded good from the website, their main mirror site is having troubles now and I was unable to download a "unzip and go, i.e. a pre-built" Windows version of this thing. So evidently this may take more work than the main website claims.
|
|---|