Yes, they are different data structures and thus will have a different memory footprint. In your example, you are comparing the memory usage of a scalar to the memory usage of a list which contains 4 scalars ($list[0], $list
). The point I'm making is that you're comparing apples to oranages...
.