In the code below
my $code_ref = sub { my $array_ref; my $nested_code_ref = sub { my @array = ("one","two","three"); $array_ref = \@array; }; $nested_code_ref->(); return $array_ref; }; print $code_ref->()->[0]; print $code_ref->()->[1];
Is it possible to call the anonymous block referenced by $nested_code_ref outside the anonymous block $code_ref.
In reply to Nested references by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |