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.In reply to Re^2: swap columns in a 2-dim array
by polettix
in thread swap columns in a 2-dim array
by davidj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |