in reply to Using regex to select an option with WWW::Mechanize
What follows is an explanation of what the original code is doing.
You probably want:
What you have is the same as:$mech->set_visible([ option => qr/.+/ ]); # ^^
In other words, you are passing the result of matching qr/.+/ against $_ (and this likely is where the Use of uninitialized value warning is coming from), not the regular expression itself.$mech->set_visible([ option => ($_ =~ m/.+/) ]);
|
|---|