in reply to Modification of a read-only value attempted

In addition to what the A.M. said, it's maybe worth pointing out that $sub is not a copy of, but rather an alias to the elements being iterated over — which explains why the modification is being attempted on the constant "_iata_city" itself.