package Module_IO; use Moose; has name => (is => 'rw', isa => 'Str'); has net_type => (is => 'rw', isa => 'Str'); has width => (is => 'rw', isa => 'Str'); has direction => (is => 'rw', isa => 'Str'); sub print_all_IO{ my ($self) = @_; print $self->name; } #### $Module_IO_container[$FileNum][$index] = $obj; #### foreach my $a1 (@Module_IO_container) { foreach my $b1 (@$a1) { print $b1->print_all_IO, "\n"; } }