Leser: 1
![]() |
|< 1 2 >| | ![]() |
13 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
use warnings;
sub script {
my $globale_variable;
sub function {
$globale_variable;
}
}
Variable "$globale_variable" will not stay shared at ...
QuoteWhen the inner subroutine is called, it will probably see the value of
the outer subroutine's variable as it was before and during the *first*
call to the outer subroutine; in this case, after the first call to the
outer subroutine is complete, the inner and outer subroutines will no
longer share a common value for the variable. In other words, the
variable will no longer be shared.
![]() |
|< 1 2 >| | ![]() |
13 Einträge, 2 Seiten |