|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Reading the output of Dumper
|
When I invoke Dumper on a variable like this:
my $cgi2 = new CGI;
print "<pre>" ;
print Dumper($cgi2) ;
print "</pre>" ;
I get this output:
$VAR1 = bless( {
'.parameters' => [
'category',
'region',
'keys',
'display',
'begin',
'end',
'B1'
],
'B1' => [
'Search'
],
'region' => [
'ANY'
],
'end' => [
'10'
],
'display' => [
'10'
],
'keys' => [
''
],
'.charset' => 'ISO-8859-1',
'.fieldnames' => {},
'begin' => [
'1'
],
'category' => [
'ANY'
],
'escape' => 1
}, 'CGI' );
So far, so good.
Now, how do I access the elements of $cgi2 ?
I've tried:
print "TEST: " . $cgi2{'display'} . "\n" ;
OR
print "TEST: " . $cgi2{'display'}[0] . "\n" ;
(thinking that the '[' and ']' means it's an array )
but it just says: TEST:
Thanks,
Eric
--
# Eric Lucas
#
# "Oh, I have slipped the surly bond of earth
# And danced the skies on laughter-silvered wings...
# -- John Gillespie Magee Jr
-
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**
|
|