Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dumping vars from CGI with Data::Dumper

54 views
Skip to first unread message

bu...@alejandro.ceballos.info

unread,
Dec 31, 2009, 12:04:38 AM12/31/09
to beginn...@perl.org
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 wrong? I tryied with Data::Dumper::Names and
same result.

Brian J. Miller

unread,
Dec 31, 2009, 7:36:19 AM12/31/09
to bu...@alejandro.ceballos.info, beginn...@perl.org

Where is @param defined? Is this a snippet or the whole thing? Do you
have strict and warnings turned on?

my @param = CGI->new->param;


> at the last post, it is
>
> print Dumper(param);
>
> (without the @)
>
>
>

Did you switch your 'use' statement to import 'param'? See "USING THE
FUNCTION-ORIENTED INTERFACE" section of the documentation.

--
Brian J. Miller
End Point Corp.
http://www.endpoint.com/
br...@endpoint.com

0 new messages