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


in reply to Re: swap columns in a 2-dim array
in thread swap columns in a 2-dim array

Neither your nor my solution would meet that criteria.
OP's solution meets the criterium you're de-obfuscating (only for an even number of columns, BTW, but the example assumes this). OP performs pair swapping, assuring that each column is swapped exactly once with a peer column. I think this is also the reason why OP is speaking C-ish: s?he needs to keep control over the indexes in @cols.

Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

Don't fool yourself.