WWW:Mechanize problem?
- From: "george veranis" <gveranis@xxxxxxxxx>
- Date: 29 Jan 2007 04:17:43 -0800
I use this script :
#! /usr/bin/perl
use strict;
use WWW::Mechanize;
use HTTP::Cookies;
my $outfile = "out.txt";
my $url="http://opac.uom.gr/ipac20/ipac.jsp?
profile=bib-1--1&menu=account&ts=1163590369197";
my $username = $ARGV[0];
my $mech = WWW::Mechanize->new();
$mech->cookie_jar(HTTP::Cookies->new());
$mech->get($url);
$mech->form_name('security');
$mech->field(sec1 => $username);
$mech->submit_form();
my $flag;
$flag = $mech->content() =~ /Borrower ID/;
open(OUTFILE, ">$outfile");
if ($flag){
print OUTFILE "Failure";
}
else{
print OUTFILE "Success";
}
#print OUTFILE "$flag";
close(OUTFILE);
and I get the following message if i write perl -w namefile.pl
<input> outside <form> at /home/cpanrun/parisc2.0-lp64/build/5.8.2/
lib/
site_perl/5.8.2/WWW/Mechanize.pm line 1825
but if I run the same script under Windows I get the right results.
On linux server i have perl 5.8.5 and localhost in windows i have perl
5.8.4
Have somebody any idea what is the problem because I search for i over
a week and I can't find a solution..
Thanks in advance for a reply..
.
- Prev by Date: selecting the next line of a matching
- Next by Date: fishy conditional expression
- Previous by thread: selecting the next line of a matching
- Next by thread: I don't know where to start with this one.
- Index(es):
Relevant Pages
|