Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Trying to pass a hash ref to a module

by djohnston (Monk)
on May 18, 2005 at 07:45 UTC ( [id://458099]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Trying to pass a hash ref to a module
in thread Trying to pass a hash ref to a module

Change @info and \@info to simply $info.

my $info = { address => '123 Main', choices => '2' };
and
my $page = $form->fill(scalarref => \$html, fdat => $info);

The docs for HTML::FillInForm states 'To pass multiple values using %fdat use an array reference'. At first read, this might lead you to think that you could pass an array reference instead of a hash reference, but what they actually mean is to use an array reference within the hash reference to specify multiple values for a given key.

my $info = { address => '123 Main', choices => [ '2', '3', '4' ] };

Replies are listed 'Best First'.
Re^4: Trying to pass a hash ref to a module
by bradcathey (Prior) on May 18, 2005 at 11:16 UTC

    Thanks djohnston, that was it! I had tried several more options, but that combination worked.


    —Brad
    "The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://458099]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-20 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found