#!/usr/bin/perl use strict; use PadWalker 'peek_my'; my $x = 1; sub { sub { $x }; (sub { peek_my(0) })->(); }->();