On Sat, 2006-15-04 at 22:30 +0100, Matt Richards wrote:
> hello everybody, :) 
> 
> i'm just starting with perl and i have come across a little problem that 
> i cant seem to solve, atm i have this code ...
> 
> my $response = $ua->request(POST $url,
> Content_Type => 'form-data',
> Content => my %fq_hash);
> 
> i would like the hash values in $fq_hash to be submitted as a form reply 
> using post but for some reason the script the the values are posted to 
> never seems to recive them :( .. i know the %fq_hash hash has the right 
> data in because i tried a
> print %fq_hash;
> and it returned what i expected
> 
> if anybody could help me out that would be wonderful,
> and if you can explain why this isn't working it would help me to learn 
> about perl :)
> 
> Cheers,
> 
> Matty.
> 
> 

This is just a WAG but should it be:

my %fq_hash = ();
my $response = $ua->request( POST $url,
  Content_Type => 'form-data',
  Content      => \%fq_hash,
);

This would sent a reference to %fq_hash to the method, which should
populate it.


-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to