You could do just as well inside another subroutine instead of just a bare block
I'm not seeing that:
use warnings; use strict; use warnings; use strict; sub outer { my $data = 10; sub test { print $data; } } outer(); test(); --output:-- Variable "$data" will not stay shared at t.pl line 8. 10
Nor here:
use warnings; use strict; sub outer { my $data = 10; sub test { print $data; } test(); } outer(); --output:-- Variable "$data" will not stay shared at t.pl line 8. 10
In reply to Re^2: Inner subroutines?
by 7stud
in thread Inner subroutines?
by wsppan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |