Perl Array Problem bei "Spezialfall?"

Bash, Shell, PHP, Python, Perl, CGI
Post Reply
mcdoogle
Posts: 178
Joined: 2003-07-15 13:36
 

Perl Array Problem bei "Spezialfall?"

Post by mcdoogle »

Hallo ich hab folgendes Problem.

Ich versuch eine Perlscript fuer mienen Cyrus Mailserver zu schreiben.

Code: Select all

($root, %quota) = $client->quotaroot($mailbox);
Mit dieser Zeile bekomm ich zwei Sachen. $root ist kein Problem. Aber %quota!!!
Das ist ein hash soviel weiss ich. Ich hab auch den Inhalt des hashes damit ausgelesen.

Code: Select all

while ( my ($key, $value) = each(%quota) ) {
        print "$key => $valuen";
}
Jetzt bekomme ich als $key : STORAGE das ist oki!
Aber mit dem $value kann ich nichts anfangen. Ich bekomm: ARRAY(0x8259a70) !!!

Ich nehme an das ist ein Array wo 2 Werte drin stehen. Leider bin ich noch nicht sehr gut im Perl und hab keine Ahnug wie ich an der Stelle weiter kommen!!!

Bitte helft mir!
rob
Posts: 82
Joined: 2002-06-03 21:53
Location: Brandenburg
Contact:
 

Re: Perl Array Problem bei "Spezialfall?"

Post by rob »

mcdoogle wrote: Jetzt bekomme ich als $key : STORAGE das ist oki!
Aber mit dem $value kann ich nichts anfangen. Ich bekomm: ARRAY(0x8259a70) !!!
Das ist eine Array-Referenz, Zugriff wie folgt:

$value->[Index]
Post Reply