#!/usr/bin/perl use strict; # case 1: array uses a lot of memory, and goes out of scope $0 = "highmemusage_going_out_of_scope"; { my @aap = map { $_ * $_ } ( 0 .. 100000 ); } sleep 300; #### #!/usr/bin/perl use strict; # case 2: array uses a lot of memory, and stays in scope $0 = "highmemusage_staying_in_scope"; my @aap = map { $_ * $_ } ( 0 .. 100000 ); sleep 300; #### #!/usr/bin/perl use strict; # case 3: use as baseline mem usage of your perl $0 = "reference"; sleep 300;