Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Perl script for running a CGI-BIN service over the web

by Anonymous Monk
on Oct 13, 2013 at 14:53 UTC ( #1058079=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi there Monks!
So, I am new to Perl and I need to create a script that can send data to a webpage (it's a tool that I need for my research) and then, when the service finishes running, get the results.
The web-tool is this:

and to see the results, you can use this example sequence:

So, I need first to select one of the radio-buttons, then paste the sequnce in the textarea, then press Submit and then, in the results page, either download it or "read" the result, which, in this example is:
According to Signal-3L engine for your selected species, the signal pe +ptide is:1-42

Can you give me hints/links on where to start? Because there are quite a few tools that I need to run through the web and it would be easier to know how to do it.
Thank you!

Replies are listed 'Best First'.
Re: Perl script for running a CGI-BIN service over the web
by hippo (Monsignor) on Oct 13, 2013 at 15:44 UTC

    A good place to start would be LWP but only assuming that you know about HTTP. If that isn't the case, read up about HTTP first.

Re: Perl script for running a CGI-BIN service over the web
by NetWallah (Abbot) on Oct 13, 2013 at 17:24 UTC
    You need to send data to the web page using the POST method, as described in this stackoverflow article.

    which did not work on your site because it requires POST.

    After the POST is sent, you need to write code to parse the response.

                 When in doubt, mumble; when in trouble, delegate; when in charge, ponder. -- James H. Boren

Re: Perl script for running a CGI-BIN service over the web
by CountZero (Bishop) on Oct 13, 2013 at 17:41 UTC
    Try WWW::Mechanize.


    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1058079]
Approved by Old_Gray_Bear
[stevieb]: shmem It's something I desired to have years ago, which is why I took over berrybrew. Cross-platform build/test automation locally, or over the network Test::BrewBuild
[shmem]: sounds good.
[shmem]: but I'm crumbling smaller stones. remember...
[stevieb]: I'm working on it to fatten it up and make it more reliant so I can finalize my Raspberry Pi automated build system for that software :) It's all well and fun, until I try to make it work with Windows lol
[shmem]: "debugging a program is more difficult than to write it in the first place. If you code your program as smart as you are, you are, by definition, too dumb to debug it."
[stevieb]: I literally laughed. That's good :) Perhaps I just need to go climb another mountain and forget about it

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2017-03-28 22:12 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (342 votes). Check out past polls.