1 2 3 4 5 6 7
use 5.008; use strict; use warnings; use constant MTH_CONST => ["rot","blau","orange"]; print ${\MTH_CONST}->[0];
scalar @${\MTH_CONST};
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
2012-09-29T11:16:35 pqCode (perl): (dl )1 2 3 4 5 6 7 8use constant MTH_CONST => ["rot","blau","orange"]; for my $i (0 .. $#{ MTH_CONST() }) { say MTH_CONST->[$i]; } __END__ rot blau orange
for my $i (0 .. $#{ xyz() })
1 2 3 4 5 6 7 8 9
#!/usr/bin/perl use strict; use warnings; use constant MTH_CONST => ["rot","blau","orange"]; for my $i (0..$#{MTH_CONST()}) { print "Farbe ($i) = ".MTH_CONST()->[$i]."\n"; }