You should do this using the %{} string array syntax, like you've done in your other script.