in reply to Re: www::mechanize matchup.io form and clicking
in thread www::mechanize matchup.io form and clicking

The point I was trying to make is that the form items that need to be posted contain square brackets
user[email]= (email) user[password]= (password)
I imagined people in this group who know www::mechanize would see the issue help me understand how to pass this to the from as the obvious way to me does not work

As I said I'm only just learning www::mechanize and whilst searching for help I saw people write that members of this site know www;:mechznize..

$agent->submit_form( form_number => 1, fields => { user[email] => $login, user[password] => $passwor +d }, );
syntax error at ./mechaM.pl line 20, near "user[" Execution of ./mechaM.pl aborted due to compilation errors.

Replies are listed 'Best First'.
Re^3: www::mechanize matchup.io form and clicking
by choroba (Cardinal) on Apr 19, 2015 at 11:21 UTC
    I'm not sure it solves your problem, but to create a hash with the keys specified in Perl, you have to quote the keys, as they aren't simple barewords:
    fields => { 'user[email]' => $login, 'user[password]' => $pas +sword },

    See perlop for details:

    The => operator is a synonym for the comma except that it causes a word on its left to be interpreted as a string if it begins with a letter or underscore and is composed only of letters, digits and underscores.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re^3: www::mechanize matchup.io form and clicking
by Anonymous Monk on Apr 20, 2015 at 11:23 UTC
    If this is "the point that you are trying to make," then be sure to make that clearly. Emphasize it. When your question is clear and direct, an answer follows quickly. If not, confusion and requests for clarification.