Nested subroutine with local variable : Nested « Subroutine « Perl
- Perl
- Subroutine
- Nested
Nested subroutine with local variable
$value = 1;
sub printem() {
print "\$value = $value\n"
};
sub makelocal() {
my $value = 2;
printem;
}
makelocal;
printem;
Related examples in the same category