On 2022-12-17 10:19, Roman Perepelitsa wrote:
Right as usual Roman. The next puzzle is why it was working without that previously. I had 'IN' declared globally and it was fine. I'll restore a backup and probe that. Mind, it's better to have IN local anyway, so maybe I should let sleeping dogs lie. I don't understand the difference between '-A' and '+A' maybe that's part of it -- the global array might not be overwritten cleanly or something. But local is best anyway. Thank you Sensei.n_input() { local -A IN set -A IN "${(@Pkv)1}" } Note: 1. IN needs to be declared. 2. Quotes are necessary to handle empty keys and/or values. 3. The extra $ expansion is not necessary. Roman.