# an arbitrary permutation @o = @permutation = (1,2,0); # position of 0 is in $o[2], so $p[0]=2. # This leads to @p = @positions = (2,0,1); # And then print " o[p] = (@o[@p]) = p[o] = (@p[@o]) \n";