while(my $trade = $trdstmt->fetchrow_hashref()) { print Dumper $trade; &$action(%$trade); $count++; }