Thread httpd.conf bei apche2 unter suse 9.3 ganz anders (25 answers)
Opened by Froschpopo at 2005-11-03 10:48

pq
 2005-11-09 09:12
#31226 #31226
User since
2003-08-04
12208 articles
Admin1
[Homepage]
user image
warum ist der papst katholisch?
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
tina@lugosi:~$ perl -Mstrict -wle'
sub handler {
 my $x = 23;
 sub inner {
   print "inner before: $x";
     $x = $x + 42;
     print "inner: $x";
 }
}
inner();
'
Variable "$x" will not stay shared at -e line 5.
Use of uninitialized value in concatenation (.) or string at -e line 5.
inner before:
Use of uninitialized value in addition (+) at -e line 5.
inner: 42

und das ganze mit our:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
tina@lugosi:~$ perl -Mstrict -wle'
sub handler {
 our $x = 23;
 sub inner {
     print "inner before: $x";
     $x = $x + 42;
     print "inner: $x";
 }
}
inner();
'
Use of uninitialized value in concatenation (.) or string at -e line 5.
inner before:
Use of uninitialized value in addition (+) at -e line 5.
inner: 42
\n\n

<!--EDIT|pq|1131520851-->
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread httpd.conf bei apche2 unter suse 9.3 ganz anders