while(my $trade = $trdstmt->fetchrow_hashref()) { print Dumper $trade; &$action(%$trade); $count++; } #### $trdstmt->bind_param(1,$self->{'startdate'}) or die "Bind failed: $DBI::errstr"; $trdstmt->bind_param(2,$self->{'enddate'}) or die "Bind failed: $DBI::errstr"; $trdstmt->execute() or die "Execute: $DBI::errstr";