Thread exists (14 answers)
Opened by Froschpopo at 2006-09-19 19:50

Froschpopo
 2006-09-21 02:35
#70073 #70073
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
[quote=renee,20.09.2006, 16:33]
Code: (dl )
1
2
3
%hash = (foo => ["bar", "foobar"]);
$hashref = \%hash;
print ref($hashref->{foo}) . "\n";
[/quote]
genau so; aber lieber wäre mir noch:
Code: (dl )
1
2
3
%hash = (foo_hat_einen_langen_name => ["bar", "foobar"]);
$hashref = \$hash{foo_hat_einen_langen_name};
print ref($hashref) . "\n";


Außerdem finde ich; sieht es doof aus wenn ich: $hashref->{key}->[2] aufrufe. Lieber würde ich nur die arrayref aufrufen.\n\n

<!--EDIT|Froschpopo|1158791788-->

View full thread exists