Thread OOP, Hash an den Konstruktor uebergeben (3 answers)
Opened by styx-cc at 2007-12-12 15:50

pq
 2007-12-12 16:09
#103782 #103782
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$ perl -wle'
my %h = (a => 23, b => 24, c => 25);
print "while";
while (my ($k, $v) = each %h) {
print "$k => $v";
}
print "for";
for (my ($k, $v) = each %h) {
print "$k => $v";
}
'
while
c => 25
a => 23
b => 24
for
c => 25
c => 25
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 OOP, Hash an den Konstruktor uebergeben