Thread $#array aber wie bei hash? (11 answers)
Opened by mhybner at 2005-07-30 15:16

Crian
 2005-08-01 13:38
#56847 #56847
User since
2003-08-04
5873 Artikel
ModeratorIn
[Homepage]
user image
[quote=esskar,30.07.2005, 14:24]
Code: (dl )
(scalar %$hashref) / 2
[/quote]
Code: (dl )
1
2
3
4
5
6
7
c:\>perl
my %hash = qw/a 1 b 2 c 3 d 4 e 5/;
my $ref = \%hash;
my $anzahl = scalar(@{[%$ref]}) / 2;
print $anzahl, "\n";
^Z
5


;)
s--Pevna-;s.([a-z]).chr((ord($1)-84)%26+97).gee; s^([A-Z])^chr((ord($1)-52)%26+65)^gee;print;

use strict; use warnings; Link zu meiner Perlseite

View full thread $#array aber wie bei hash?