sending scalar and hash to function [SUMMARY]

2011-06-27 Thread buzon
Found the solution (my apologies). I am receiving both an scalar, the second one as a reference, then it must be assigned to an other var. sub dosomething { ($myopt,$myparams) = @_; %myparams = $myparams; print "opt = $myopt\n"; while( my ($k, $v) = each %myparams )

sending scalar and hash to function (note)

2011-06-27 Thread buzon
of course that is sub dosomething but still not working. -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands, e-mail: beginners-cgi-h...@perl.org http://learn.perl.org/

sending scalar and hash to function

2011-06-27 Thread buzon
I am trying to send an scalar and hash to a function, but is not receiving the value of the hash My code is: dosomething('option',{'extraparam1'=>'hello'}); function dosomething { ($myopt,%myparams) = @_; print "opt = $myopt\n"; while( my ($k, $v) = each %myparams )

Dumping vars from CGI with Data::Dumper

2009-12-30 Thread buzon
I am trying to read the values of all the parameters received in a CGI. But even using a Data::Dumper::Simple module, only the names of the params are displayed, not the name/value relation of each one. use Data::Dumper::Simple; use CGI; print Dumper(\...@param); any idea what I am doing wro

Loading results (via ajax) from a CGI

2009-11-27 Thread buzon
I have a CGI (made with cgi.pm) that receive a parameters, check against a DB and returns a text with "not found" or "OK found" message. Pretty simple. In other site, i have an ajax routine that sends the parameters (via get) and is expected to capture the resulting page, but is not worki

redirecting cgi via post method

2007-02-16 Thread buzon
Greetings, I have a CGI that receives some parameters, and after processing them (it generates a file) it must be redirected to another CGI (external domain) to process it. What I want to do is similar to redirect("http://somedomain.com/cgi-bin/myscript.cgi?param1=someĀ¶m2=stuff";)