Is it possible to write a perl program that do autofilling of the login webform(username, password) of other domain (say hotmail.com). Assume domain name, username, password are passed as arguments to the perl program.

Sorry, not sure what you are asking. You could run the script as a CGI (like this forum is a CGI script) in a browser or as a command line script without the browser. -------------------------------------------------

Well, I can't determine why your computer can't connect, but my guess would be a firewall is blocking perl from accessing the internet. disable the firewall or try and add perl to the list of programs that can access the internet. Either that or the ftp site was just down for some reason.

But only you can determine why the connection is timing out when you run it on your computer, so if a firewall is not the issue you need to try and figure out what is. -------------------------------------------------

I fixed the promblem of execution of the scripts. I prefixed each command with sudo and all went well. But now I found problem with script itself. I copied a script from http://search.cpan.org/~petdance/WWW-Mechanize-1.34/lib/WWW/Mechanize/Examples.pod

Code

#!/usr/bin/perl

# turn on perl's safety features use strict; use warnings;

# work out the name of the module we're looking for my $module_name = $ARGV[0] or die "Must specify module name on command line";

# tell it to get the main page $browser->get("http://search.cpan.org/");

# okay, fill in the box with the name of the # module we want to look up $browser->form_number(1); $browser->field("query", $module_name); $browser->click();

# click on the link that matches the module name $browser->follow_link( text_regex => $module_name );

my $url = $browser->uri;

# launch a browser... system('Firefox', $url);

exit(0);

But I am getting the following error

User_Name-MacBook:~/Desktop USer_Name$ perl temp.pl www::mechanize There is no form numbered 1 at temp.pl line 21 Can't call method "value" on an undefined value at /Library/Perl/5.8.6/WWW/Mechanize.pm line 1247.

Even I looked at the source the webpage and found the name of the form as "f". Then I changed the code $browser->form_number(1); to $browser->form_name('f'); again its not working. What might be the problem?

I have little practical experience with WWW::Mechanize so I am really not going to be able to help much. When running your code make sure there is no firewall blocking your perl script from accessing the internet. -------------------------------------------------

You're asking the wrong person, I have almost no experience with that module. And it's too complex a module for me to want to try and learn it well enough to answer your questions. I suggest you hop over to perlmonks.com or devshed.com or possibly tek-tips.com and see if those more active perl forums have someone that can help you out. -------------------------------------------------