... use Devel::Size qw[ total_size ]; ... unless( int( time ) % 3600 ) { open my $sizelog, '>', '/some/path/' . localtime() . '.log' or warn $!; print $sizelog "$_ =>", total_size( $::{ $_ } ) for sort keys %::; close $sizelog; } #### :> 378 ☼ :> 418 ↕ :> 262 ▬ :> 345 ↨ARNING_BITS :> 400 ↑ :> 330 ! :> 403 " :> 292 $ :> 272 + :> 552 - :> 552 / :> 382 0 :> 386 1 :> 425 2 :> 407 :: :> 460 @ :> 950 ARGV :> 390 Devel::Size: Calculated sizes for compiled regexes are incompatible, and probably always will be AutoLoader:: :> 25020 BEGIN :> 272 CORE:: :> 930 Carp:: :> 17283 Devel::Size: Calculated sizes for compiled regexes are incompatible, and probably always will be Config:: :> 91676 DB:: :> 850 Devel::Size: Calculated sizes for compiled regexes are incompatible, and probably always will be Devel:: :> 22891 Devel::Size: Calculated sizes for compiled regexes are incompatible, and probably always will be DynaLoader:: :> 55547 ENV :> 6491 Devel::Size: Calculated sizes for compiled regexes are incompatible, and probably always will be Exporter:: :> 23537 INC :> 1710 IO:: :> 928 Internals:: :> 3421 Mac:: :> 1725 PerlIO:: :> 2363 Regexp:: :> 933 SIG :> 3595 STDERR :> 274 STDIN :> 272 STDOUT :> 274 UNIVERSAL:: :> 1857 VMS:: :> 1248 Win32:: :> 11242 ] :> 355 _ :> 345 _<..\perlio.c :> 336 _<..\universal.c :> 348 _<..\xsutils.c :> 340 _<.\win32.c :> 328 _ 339 _ 479 _ 330 _ 328 attributes:: :> 947 Devel::Size: Calculated sizes for compiled regexes are incompatible, and probably always will be main:: :> 299655 stderr :> 274 stdin :> 272 stdout :> 274 strict:: :> 6427 total_size :> 844 utf8:: :> 4344 Devel::Size: Calculated sizes for compiled regexes are incompatible, and probably always will be vars:: :> 9566 warnings:: :> 58863