I have an array of hash that one of the value of hash is an array . -> I push "@title" to "part" and for print , -> I put each of books{part} in a temporary array to access each element of title but it just print the first element I can't access all element of "title" in array "books"
@books = ();
@title = (1,2,3,4,5);
push @books,{subject=>"hello" , part =>@title };
for($i=0;$i<scalar(@books);++$i)
{
print $books[$i]{subject};
@temp = $books[$i]{part};
for($j=0;$j<scalar(@temp);++$j)
{
print $temp[$j]; #this print just first element "1"
}
}