I know what's wrong with sub a { } my @b; sub { a $b[0]; sub c { a $b[0] }; c }->(); from both the Perl level (declaring a global sub inside an anonymous codeblock is dubious at best) and the C level (although the TARG for the padav in sub c is correct, it ends up that PL_curpad is wrong [1 too high], and UNDEF gets put on the stack instead of @b, which results in a segfault at AvFILL(av) in pp_hot.c:2791 (perl@7892). I can't quite figure out why. @b has to be a lexical array, the arguments to a() have to be padav aelems, it has to be called from an anonymous codeblock and the first call to a() has to be lexically before the subroutine definition. Does anyone have any clue? Ben -- Benjamin Holzman ECNvantage Corp. Chief Technical Officer 295 Park Avenue S., Suite 7C (212) 358-0436 : bah@ecnvantage.com New York, NY, 10010 $ perl -le 'print join $" ,reverse map ucfirst ,qw{ hacker perl another just}'