$id_chap is a different variable from @id_chap.
Do you want something like this?
foreach my $row ( @id_chap ) {
foreach my $col ( @{$row} ) {
print "\t$id_chap[$row][$col]\n";
}
}
| [reply] [d/l] |
I'm unclear as to what you're trying to do. Your last few posts and chatterbox conversations have been on the subject of printing data from within one data structure or another. In previous questions some people have provided various working code examples which produce the output you seem to be asking for. If these do not do what you want, you have to actually tell people what you're input is and what output you expect.
Once again, take the time to read and understand:
| [reply] |
Perhaps you were thinking about something like this? foreach($id_chap)
{
print "\t", $_->[0],"\n";
print "\t", $_->[1],"\n";
}
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James My blog: Imperial Deltronics
| [reply] [d/l] |
| [reply] |