in reply to Hashes/Scalars and Memory Usage

Testing on a Solaris box, with the following two scripts:

#script one $f1="X" x 200000; $f2=$f1; $f3=$f1; ... $f30=$f1; while (1) {sleep 1} #script two for (1..30) { $f{$_}="X" x 200000; } while (1) {sleep 1}
They seem to be identical in memory usage.

Process 1:
Text  VSS: 1.9mb   Data  VSS: 8.1mb   Stack VSS:  16kb
Shmem VSS:   0kb   Other VSS:   0kb   Total VSS:  10mb

Process 2:
Text  VSS: 1.9mb   Data  VSS: 8.1mb   Stack VSS:  16kb
Shmem VSS:   0kb   Other VSS:   0kb   Total VSS:  10mb

I would suspect how you end up populating/using the scalars and/or hashes would have a greater effect.