Lawliet has asked for the wisdom of the Perl Monks concerning the following question:
Is it possible to use regular expressions as a way to fill in option fields when using WWW::Mechanize's set_visible method? For example, $mech->set_visible([ option => /.+/ ]); I have tried the aforementioned code and it returns the error:
Use of uninitialized value in pattern match (m//) at name.pl line 72. The 'B3200L' field can't be unchecked at /usr/local/share/perl/5.8.8/W +WW/Mechanize.pm line 1429
Making me think something is going wrong... ;)
Either that, or is there a way to select an option by it's number on the option list? Knowing how to would prove just as helpful.
EDIT: It should be noted that there are multiple option inputs each on a seperate page. Also, thanks pc88mxer for the elaboration.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using regex to select an option with WWW::Mechanize
by pc88mxer (Vicar) on Jul 06, 2008 at 06:00 UTC |