WWW:Mechanize problem?



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..

.



Relevant Pages

  • Re: file access trouble
    ... Tried your suggestion - did not make any difference - my script does not ... >> I am a new user to perl - trying to teach myself enough perl to do a ... >> I created another windows based program that creates the .htpasswd file ...
    (comp.lang.perl.misc)
  • [SLE] running CGI scripts written in notepad
    ... I'm currently learning CGI programming with perl and have built up a webserver ... I'm doing my development work on a windows ... If I write a perl script on my SuSE machine and put it in CGI bin, ... If I write a perl script on a windows machine, then copy it onto my Linux ...
    (SuSE)
  • Re: vbscript or perl
    ... I've never done Windows scripting before. ... > perl. ... > The script in question most does database stuff e.g. calls stored procs, ... I think clearly vbscript would be the way to go. ...
    (comp.lang.perl.misc)
  • Re: Perl script into a Windows Service
    ... > For the last several months, I have been trying to turn a simple Perl ... > into a Windows 2000 service. ... It almost sounds like setting up a Perl script to run as a ... Add the String Value: Application ...
    (comp.lang.perl.misc)
  • re: how to tell when a file was last read
    ... address Linux, I'll address Windows. ... The easiest way to view the last access time of a file ... I like to use Perl for this sort of thing. ... On my Perl page, there is a script ...
    (Security-Basics)