the STDIN never gets the output of the hash, it just sits there. If I type in a valid value for foo it processes it. So now off to google to see how to fix it.
thanx,
bill
*******************************
$query = $dbh->prepare("SELECT foo, foo1 FROM foo_table");
$query->execute();
$res = $query->fetchall_arrayref();
foreach $row (@$res) {
$hashmap{$row->[0]} = $row->[1];
}
$query->finish;
$query = $dbh->prepare("SELECT foo, bar, bar1, bar2 FROM bar_table WHERE foo1=? AND foo=?");
while (<STDIN>) {
chomp ($foo = $_);
print("$foo\\n");
$hashedfoo = $hashmap{$foo};
$query->execute($hashedfoo, $foo);