hi pDale
this is the entire code ...
============
while(my $row_href = $sth->fetchrow_hashref)
{
print "$row_href->{'area'}\n";
}
foreach my $key (keys %$row_href)
{
print "hi\n";
print "$key = ".$row_href->{$key}."\n";
}
=================
the "while" correctly outputs the values for the column/field "area" - so
the hash at that point has the data.
the "foreach" outputs nothing - does not even enter the loop since the
"hi" does not print....
hope you can help!
<quote who="pDale">
> On 3/27/06, Mario R. Sanchez, Ph.D. <[EMAIL PROTECTED]> wrote:
>>
>> >> how can i get the column names - what i presume to be the keys to the
>> >> hashref? assume that i just want to list the column names.
>> >>
>> > Try this:
>> > foreach my $key (keys %$row_href)
>> > {
>> > print "$key = ".$row_href->{$key}."\n";
>> > }
>> tried it - no output whatsoever....
>> ideas?
>>
>
> Could you post the code you tried?
>
> Also, 'perldoc -f keys' might tell you something.
>
> --
> pDale Campbell
> "Then there's the object-oriented version of Cobol,
> called ADD_ONE_TO_COBOL" -- Stev0 the geek
> _______________________________________________
> ActivePerl mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs