http://www.perlmonks.org?node_id=467632


in reply to swap columns in a 2-dim array

Silly idea, perhaps: swapping rows an AoA is dead easy. So, perhaps you could transpose your matrix, swap the rows, and transpose it back.