Thread Anzahl der Schlüssel eines Hashs: %hash (7 answers)
Opened by Duff at 2007-06-29 17:18

pq
 2007-06-29 19:07
#78018 #78018
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
[quote=Duff,29.06.2007, 15:58]
Code: (dl )
1
2
3
my @keys = keys %hash;
my $length=$#keys+1-$[;
print "$length\n";
[/quote]
kleiner scherz, oder?

merke:
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"

Code: (dl )
my $anzahl = keys %hash;
\n\n

<!--EDIT|pq|1183129747-->
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 Anzahl der Schlüssel eines Hashs: %hash