in reply to how to print dynamicaly ?

$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"; } }

Dave