By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,847 Members | 1,317 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,847 IT Pros & Developers. It's quick & easy.

Can't call method "value" on an undefined value error after perl script is run

P: 5
If I run the below program . I get the following error message
Can't call method "value" on an undefined value at C:/Perl/site/lib/Win32/IE/Mec
hanize.pm line 900.

Please let me know your inputs on the same


#!c:\perl\bin\perl.exe

use strict;
use WWW::Mechanize;
use HTTP::Cookies;
use LWP::debug qw(+);
use Win32::IE::Mechanize;

my $outfile = "out.htm";
my $url = "http://www.mindsrc.com/index.php?id=careers_submit";

my $mech= Win32::IE::Mechanize->new();
$mech->get($url);

sleep 10;

$mech->form_name("subapp");

my $f = "14232";
my $l = "6847";

sleep 5 ;
$mech->field(first => $f);

$mech->click();

#use LWP::debug qw(+);

my $output_page = $mech->content;


open(OUTFILE, ">$outfile");
print OUTFILE "$output_page";
print $output_page;

close(OUTFILE);


Kindly guide me how can I get over this issue.

Mithun
Mar 19 '08 #1
Share this Question
Share on Google+
1 Reply


P: 5
Hello All,

just to be more clear . I am trying to fill up the fields of the website and want to do a submit from the script.
But I get the following error

Can't call method "value" on an undefined value at C:/Perl/site/lib/Win32/IE/Mec
hanize.pm line 900.





If I run the below program . I get the following error message
Can't call method "value" on an undefined value at C:/Perl/site/lib/Win32/IE/Mec
hanize.pm line 900.

Please let me know your inputs on the same


#!c:\perl\bin\perl.exe

use strict;
use WWW::Mechanize;
use HTTP::Cookies;
use LWP::debug qw(+);
use Win32::IE::Mechanize;

my $outfile = "out.htm";
my $url = "http://www.mindsrc.com/index.php?id=careers_submit";

my $mech= Win32::IE::Mechanize->new();
$mech->get($url);

sleep 10;

$mech->form_name("subapp");

my $f = "14232";
my $l = "6847";

sleep 5 ;
$mech->field(first => $f);

$mech->click();

#use LWP::debug qw(+);

my $output_page = $mech->content;


open(OUTFILE, ">$outfile");
print OUTFILE "$output_page";
print $output_page;

close(OUTFILE);


Kindly guide me how can I get over this issue.

Mithun
Mar 19 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.