# I have a hash
my %my_hash;
# I have an array
@my_array = ["aa" , "bbb"];
# I store the array in my hash
$my_hash{"Kunjan"} = @my_array;
# But I can't print my array's element
print $my_hash{"Kunjan"}[0];
Sono nuovo di Perl. Mi aiuti per favore.Come accedere all'elemento dell'array memorizzato nel mio hash in Perl?
Nessuno lo ha ancora menzionato, ma controlla il ricettario di Strutture dati. Ha molti esempi per la creazione e l'accesso ai dati in varie strutture nidificate. Puoi leggerlo sul tuo computer usando il comando 'perldoc perldsc' e puoi anche trovarlo su http://perldoc.perl.org/perldsc.html – daotoad
Inoltre, vedi http://perlmonks.org/?node= riferimenti + quick + riferimento – ysth