mecrazycoder has asked for the wisdom of the Perl Monks concerning the following question:
Please help me to rectify this error#!/usr/bin/perl use WWW::Mechanize; my $mechObj = WWW::Mechanize->new(); if( scalar(@ARGV) ne 4) { help(); } my $username = $ARGV[0]; my $password = $ARGV[1]; my $recvNo = $ARGV[2]; my $textMsg = $ARGV[3]; $mechObj->get("http://wwwl.way2sms.com/content/index.html"); unless( $mechObj->success() ) { exit; } $mechObj->form_number(1); $mechObj->field('username', $username); $mechObj->field('password', $password); $mechObj->submit_form(); $mechObj->get("http://wwwl.way2sms.com//jsp/InstantSMS.jsp?val=0"); $mechObj->form_number(1); $mechObj->field("MobNo",$recvNo); $mechObj->field("textArea",$textMsg); $mechObj->submit_form(); if($mechObj->success()) { print "Done \n"; } else { print "Failed \n"; } sub help { print "\nUsage:\n"; print "\tScriptname.pl <user_name> <password> <receiver_name> <msg +>\n"; exit(0); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Mechanize - Can't call method value
by Corion (Patriarch) on Mar 26, 2011 at 18:48 UTC | |
by mecrazycoder (Sexton) on Mar 26, 2011 at 19:01 UTC | |
by Corion (Patriarch) on Mar 26, 2011 at 19:09 UTC | |
|
Re: Perl Mechanize - Can't call method value
by ww (Archbishop) on Mar 26, 2011 at 19:41 UTC |