{ my $foo = 'X' x 100000000; <-- a lexical var $foo getc; } undef $foo; <-- the package var $foo was my $foo = ""; already undef so does nothing getc; #### { my $foo = 'X' x 100000000; getc; undef $foo; } getc;