Both methods worked. I tested each and they did what I expected. the hash uses the array index as a key and the array value as a value so no real worry about order, i can sort by key as I print. and
is a somewhat murky but still valid way to assign a hash. When the deletes are complete the plan is to overwrite the original file, which is used as a data source for another cgi script.