in reply to Re^4: How to calculate the column and print it in pie chart format using perl?
in thread How to calculate the column and print it in pie chart format using perl?

Replace

my $table = $sth->fetchall_hashref; for my $r (@$table) {
with
while(my $r=$sth->fetchrow_hashref ){

So what did your boss say? Did you tell him yet that you cannot do this yourself and that you need to get others to do your assignments for you? He should be getting that idea by now anyway.

edit killed erroneous semicolon