foreach(@all_things_from_array_1){  $statement = "SELECT ".$hash{(split(/\s/,$_))[0]}." ".$_;  print $statement; }