You mentioned the command line in your error message. Perhaps you want to use @ARGV instead of <STDIN>?
use strict; use warnings; use WWW::Mechanize qw( ); use File::Basename qw( basename ); sub usage { my $prog = basename($0); print STDERR ("usage: $prog {zipcode}\n"); exit(1); } my ($zip_code) = @ARGV; defined($zip_code) or usage(); my $browser = WWW::Mechanize->new(); $browser->get("http://www.unitrinspecialty.com/us/locator/"); $browser->form_name('zipForm'); $browser->field("zipCode", $module_name); $browser->click();
In reply to Re^5: WWW::Mechanize problem
by ikegami
in thread WWW::Mechanize problem
by SavagePerl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |