Your post has no question in it, so let's assume you want pointers to how to do it.
You should look at the docs to the CGI module, specifically the param function. Here's a rough outline of how the script could look:
--#!/usr/bin/perl -wT use strict; use CGI qw(header param); # Assume your form inputs are called ip1 and ip2 my (@ips) = (param('ip1'), param('ip2'); # Untaint the IP data # Note: This is very 'quick and dirty', and [mirod]'s # solution below is much better. foreach (@ips) { s/^(\d+\.\d+\.\d+\.\d+).*$/$1/; } # print HTTP header print header(-type => 'text/plain'); # Call BING (I'm guessing at the syntax) # and print the output print qx(BING $ips[0] $ips[1]);
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
In reply to Re: Bing made into a cgi perl script
by davorg
in thread Bing made into a cgi perl script
by jamesp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |