This code @newList[@newOrder] = @list; Means:- $newList[1] receives $list[0] which is 'zero' $newList[3] receives $list[1] which is 'one' $newList[4] receives $list[2] which is 'two' $newList[0] receives $list[3] which is 'three' $newList[2] receives $list[4] which is 'four' whereas this code @newList = @list[@newOrder]; Means:- $newList[0] receives $list[1] which is 'one' $newList[1] receives $list[3] which is 'three' $newList[2] receives $list[4] which is 'four' $newList[3] receives $list[0] which is 'zero' $newList[4] receives $list[2] which is 'two'