Thread Array (5 answers)
Opened by Graf Herschel at 2012-09-29 13:06

pq
 2012-09-29 13:16
#162184 #162184
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Code (perl): (dl )
1
2
3
4
5
6
7
8
use constant MTH_CONST => ["rot","blau","orange"];
for my $i (0 .. $#{ MTH_CONST() }) {
    say MTH_CONST->[$i];
}
__END__
rot
blau
orange
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 Array