in reply to Re^2: DBI and mysql query formatting
in thread DBI and mysql query formatting

Yes, I agree. But the goal of the OP is to have the same order for the $str and $val, not for every run.

Replies are listed 'Best First'.
Re^4: DBI and mysql query formatting
by afoken (Chancellor) on Dec 08, 2013 at 14:37 UTC
    But the goal of the OP is to have the same order for the $str and $val, not for every run.

    That's what values guarantees:

    [...] So long as a given hash is unmodified you may rely on keys, values and each to repeatedly return the same order as each other. [...]

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      Ah, like the OP I was never sure about that and had not come across the guarantee you quote.

      I would go with the more complete code you have posted below.