in reply to help on hashes

It all depends on what the ED::database->execute_query subroutine returns. If it does really return a list of hashes than to print it you can do following:
for $row (@rows){ for $key (keys %{$row}){ print "$key: $row->{$key}\n"; } }
The hash %rows in your code is undefined when you use it so your code does not print enything (if you don't define it somewhere else).

Update Added keys for extracting keys - thanks to edoc.

Replies are listed 'Best First'.
Re: Re: help on hashes
by edoc (Chaplain) on May 12, 2003 at 14:06 UTC

    You might want to test your code before posting.. try this instead..

    foreach my $row (@rows){ foreach my $key (keys %$row){ print "$key: $row->{$key}\n"; } }
      thanks a bunch , this did it work , great help , the code that i pasted was a very quick one and i was playing around with the last three lines in my code ,and i just pasted what i had so that you guys could get a idea of where i was heading , but really thanks alot

        I was actually referring to zby's code where a lil bit was missing but has been fixed up now.

        cheers,

        J