It looks like the second approach is better, coz' you don't need to define a hash and then take it's values and print them, it depends on hoe much you need good performances.
If the order of the rows in the array doesn't matter to you, I can suggest that after reading the array, loop on the indexes to be deleted and move each time the last array entry to to the place to be deleted (and of course pop it):
just make sure that the last index of @rows is not an index you want to delete. I think this is better if you care for performances (but only if the order is not relevant, as I said)