Schrift
Wiki:Tipp zum Debugging: use Data::Dumper; local $Data::Dumper::Useqq = 1; print Dumper \@var;
[thread]7174[/thread]

$#array aber wie bei hash? (Seite 2)



<< |< 1 2 >| >> 12 Einträge, 2 Seiten
pq
 2005-07-30 23:06
#56846 #56846
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
[quote=mhybner,30.07.2005, 20:28]ups, klappt doch! ich hatte einen typo im hashnamen.[/quote]
Wiki:use strict;
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
Crian
 2005-08-01 13:38
#56847 #56847
User since
2003-08-04
5866 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
<< |< 1 2 >| >> 12 Einträge, 2 Seiten



View all threads created 2005-07-30 15:16.