Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get Key/Value pairs from the HTML form using ActivePerl modules

Status
Not open for further replies.

bijuperl

Programmer
Apr 11, 2002
6
0
0
IN
Hi,
I had posted the same problem earlier but the answers were not what i wanted.Please note that I'm using some modules of ActivePerl for Windows.
My problem is:
I'm setting some values in a HTTP Server thru the GUI,which is nothing but a HTML web page.I'm able to set values in the server using the perl script that i have written:
It looks like this:
-----------------------------
use HTTP::Request::Common;
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$ua->request(POST ' [ nest_printer_name => 'mon',
start_page_enable => 'Off',
FpMenuLocked => 'Off',
help_ehandler => 'On',
estar_enabled => 'On',
front_panel_language => 'Fran\uçais',
nest_system_location => 'bijus cube',
nest_system_contact => 'christy',
wait_timeout => '200',
job_timeout => '300',
multipurpose_timeout => '1 Minute',
print_quality => 'Enhanced',
ImageSmoothing => 'On',
Duplex => 'Long Edge',
color_correction => 'None',
media_source => 'Tray 1']);
----------------------------------------
Now i want to get the values that i have just set,using another perl script so that i can compare the two and give a log file as to whether the values are correctly set or not.This will eliminate going to the GUI and entering the values in the HTML web page and then checking whether its correctly set or not.For that i'm using the script:
-------------------------------------------------
use HTML::Form;
$htmlfilename = "/printerdefaults.shtml";
$ipaddress = "@forms = HTML::Form->parse($htmlfilename, $ipaddress);

But the parse function is not populating the array @forms, with the form objects and i'm stuck here.
Is there any other modules in ActivePerl that i can use for doing the same?
Please send me some code..
Thanx in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top