Thread Hashslice aus Hashref ? (14 answers)
Opened by KurtZ at 2008-04-17 20:39

KurtZ
 2008-04-17 20:39
#108512 #108512
User since
2007-12-13
411 Artikel
BenutzerIn
[default_avatar]
mal wieder ne stilistische Frage, kann man mit Pfeilnotation einen Hashslice aus einem Hashref gewinnen? Ich bekomme es nur mit der @-Notation hin.

perl -e '
Code (perl): (dl )
1
2
3
$hr={a=>1,b=>2,c=>3};
print "geht: ",@$hr{a,c};
print "geht nicht:",$hr->{a,c};
'
TMTOWTDYOG (there's more than one way to dig your own grave)

View full thread Hashslice aus Hashref ?