sub do_this { my $arg = shift; my $foo = "bar"; sub do_that { print "Arg is: $arg!\n"; print "Foo is: $foo!\n"; } } do_this(1); do_that();