in reply to print the array hash without using any module

without using any modules

Without anything but DBI hopefully? Avoiding using that would be a mess.

It's probably not very efficient to do it the way you have in mind, but it might look like this:

for my $r (@values) { for my $k (keys %$r) { print "$k: $r->{$k}\n"; } }

A better way would be one row at a time:

my $sth = $db->prepare($sql) or die $db->errstr; $sth->execute or die $db->errstr; while( my $h = $sth->fetchrow_hashref ) { for my $k (keys %$h) { # also see each() print "$k: $h->{$k}\n"; } }

-Paul