I still struggle with the most basic Perl syntax and googling operators is near impossible unless you know what you don't know so you can use the right terms. So 2 questions, 1) what is the right syntax and 2) what are the terms I would have used to find the answer?
The syntax -- I have a list of something (hashes?):
my @list = [ "foo"=> "bar", "foo"=>"orange"];
I need to declare the list and then add each item individually (filling will be done in a loop and other methods), but cannot seem to find the right syntax:
my @list = [];
# add foo=bar
# add foo=orange
The end goal is to post a form that unfortunately uses duplicate keys via LWP::UserAgent
and the $ua->post( $url, \@form )
method. I can get it to work declaring the list and all contents in one go, but can't seem to find the right syntax for splitting it up and building the contents incrementally.